pyspark.sql.functions.expr

pyspark.sql.functions.expr(str: str) → pyspark.sql.column.Column[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)]