pyspark lit column
from pyspark.sql.functions import lit df.withColumn("columnName", lit())
Here is what the above code is Doing:
1. We’re creating a new column called “columnName”
2. We’re setting the value of the new column to be the value of the “value” variable
3. We’re adding the new column to the DataFrame