pyspark.sql.functions.expr

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

Parses the expression string into the column that it represents

New in version 1.5.0.

Examples

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