pyspark.sql.functions.
lit
Creates a Column of literal value.
Column
Examples
>>> df.select(lit(5).alias('height')).withColumn('spark_user', lit(True)).take(1) [Row(height=5, spark_user=True)]
previous
pyspark.sql.functions.create_map
next
pyspark.sql.functions.array