Aug 4, 2022
The following should do the trick:
```
import pyspark.sql.functions as sf
df = df.withColumn('mycol', sf.lit(True))
```
Hope it helps!
The following should do the trick:
```
import pyspark.sql.functions as sf
df = df.withColumn('mycol', sf.lit(True))
```
Hope it helps!
I strive to build data-intensive systems that are not only functional, but also scalable, cost effective and maintainable over the long term.