'TypeError: 'str' object is not callable -Pyspark
df1=df.withColumn('etl_load_dt_part_new', concat_ws("-",year(df.ETL_LOAD_DT_PART),lit('12'),lit('31')).cast('date') )
i am trying to add new column named as etl_load_dt_part_new , when i execute this through pyspark shell it does not throw any error , but while running through python script it gives this type error 'str' object is not callable any idea why?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|