DataFrame.
selectExpr
Projects a set of SQL expressions and returns a new DataFrame.
DataFrame
This is a variant of select() that accepts SQL expressions.
select()
New in version 1.3.0.
Examples
>>> df.selectExpr("age * 2", "abs(age)").collect() [Row((age * 2)=4, abs(age)=2), Row((age * 2)=10, abs(age)=5)]