pyspark.sql.functions.expr

pyspark.sql.functions.expr(str: str) → pyspark.sql.column.Column

Parses the expression string into the column that it represents

Examples

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