Skip to content

Added Support for polars #26435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

aleeminati
Copy link

Added Support for polars as an example in the fit function

Reference Issues/PRs

Fix #25896

What does this implement/fix? Explain your changes.

I've added an example to how sklearn pipeline can be extended to polars by converting it to polars before calling _fit. This can be extended to other functions like transform etc.

Added Support for polars as an example in the fit function
@aleeminati aleeminati changed the title Support for polars Added Support for polars May 25, 2023
@glemaitre
Copy link
Member

Closing this PR since we did not discuss the path forward in #25896.

We probably need to have some POC that works with the dataframe protocol as the early work proposed in #26115

I don't think that this issue will be an easy thing to solve.

@glemaitre glemaitre closed this May 25, 2023
@aleeminati
Copy link
Author

Polars comes with a to_pandas that simply converts your polars to pandas and you can simply call it before calling fit/_fit.
And the issue extends to not only column transformers but also estimators

@ogrisel
Copy link
Member

ogrisel commented May 30, 2023

I would prefer a solution that is neither polars specific (and ideally even would not require pandas anymore either) by sticking to the common dataframe spec API. This way we will be able to support any dataframe library that supports the dataframe interchange protocol, not just pandas and polars.

@glemaitre
Copy link
Member

FYI here is a proposal that does something as explained by @ogrisel: #26464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support other dataframes like polars and pyarrow not just pandas
3 participants