pyo3-polars icon indicating copy to clipboard operation
pyo3-polars copied to clipboard

Namespace API for DataFrame/LazyFrame

Open abhiaagarwal opened this issue 1 year ago • 0 comments

Currently, Polars supports defining custom functions on the DataFrame namespace on the python side with pl.api.register_dataframe_namespace/pl.api.register_lazyframe_namespace. Would it be possible for pyo3-polars to support creating a custom DataFrame namespace with this same functionality, with the defined transformations living in rust?

For a somewhat abstract example, I have a function written in rust that takes a pl.DataFrame as an argument, loads a xgboost Booster, calculates a column, then returns the DataFrame. I want to expose this exact same functionality in Python by registering some custom namespace.

abhiaagarwal avatar Jan 20 '24 18:01 abhiaagarwal