pola-rs / pyo3-polars

Plugins/extension for Polars
MIT License
238 stars 39 forks source link

Expose expressions API #1

Closed kevinheavey closed 10 months ago

kevinheavey commented 1 year ago

This crate exposes Series and DataFrame, but sometimes people write a bunch of functions that return Exprs (e.g. tidypolars).

It would be nice to be able to write these kinds of functions once in Rust and reuse them in Python.

Not sure if my favourite PyO3 issue makes this impossible for now

ritchie46 commented 1 year ago

We can use serde json to serializw/deserialize expressions. I can add this as well .

grantslatton commented 1 year ago

Would this also make it so LazyFrame could be IntoPy/FromPyObj? That would be very useful

aldanor commented 10 months ago

Can be closed now that there's an experimental version of the expressions API released?

ritchie46 commented 10 months ago

Yes, it is not exactly what was asked. But I think the derive expressions is the way to go.