How do you evaluate an expression in Rust polars without destroying the dataframe?
For example, I have an expression, for example sum(col('a') + col('b')) * col('c')
, and I want to evaluate the expression by computing the sum, but I do not want to turn the dataframe into a lazy dataframe if that means destroying the eager dataframe.
How do you do this?
The best solution I could find was to run Python from within Rust, pass the dataframe to Python, evaluate a Python polars.Expr
, and then pass both objects back to Rust.