pub fn sql_expr<S: AsRef<str>>(s: S) -> PolarsResult<Expr>
Expand description
parse a SQL expression to a polars expression
ยงExample
let mut ctx = SQLContext::new();
let df = df! {
"a" => [1, 2, 3],
}
.unwrap();
let expr = sql_expr("MAX(a)").unwrap();
df.lazy().select(vec![expr]).collect().unwrap();