polars
polars copied to clipboard
Exposing PyDataFrame from a rust library
Describe your feature request
I have a rust application using polars & pyo3. All the data collection, processing, etc, is done in rust, but I want the ability to return a pl.DataFrame/PyDataFrame to the user for interactive work in a python terminal.
Unless I'm mistaken, it's not possible to create a PyDataFrame from rust, because py-polars isn't published to crates.io.
I realize I could probably do this by calling python code from rust, I would like to avoid having to have the user install polars (the python library) because we already distribute our rust app as a static binary with no external dependencies.
This works: https://github.com/pola-rs/polars/tree/master/examples/python_rust_compiled_function
I believe this is a duplicate of #1325. I will also say that the example is not really ergonomic to use and fairly brittle to lib change.
Closing as duplicate.