I'm using spark 2.4.5. I want to add two new columns, date & calendar week, in my pyspark data frame df. So I tried the following code:
from pyspark.sql.functions import lit
df.withColumn('timestamp', F.lit('2020-05-01'))
df.show()
But I'm getting error message: AssertionError: col should be Column
Can you explain how to add date column & calendar week?