pyspark.sql.functions.
lit
Creates a Column of literal value.
Column
New in version 1.3.0.
Examples
>>> df.select(lit(5).alias('height')).withColumn('spark_user', lit(True)).take(1) [Row(height=5, spark_user=True)]