pyspark.sql.functions.expr

pyspark.sql.functions.expr(str)[source]

Parses the expression string into the column that it represents

>>> df.select(expr("length(name)")).collect()
[Row(length(name)=5), Row(length(name)=3)]

New in version 1.5.