nxcals.api.extraction.data.builders.DataFrame.selectExpr
- DataFrame.selectExpr(*expr: str) DataFrame
- DataFrame.selectExpr(*expr: List[str]) DataFrame
Projects a set of SQL expressions and returns a new
DataFrame
.This is a variant of
select()
that accepts SQL expressions.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)]