Skip to content
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

Polars support #2622

Open
MarcoGorelli opened this issue Sep 14, 2024 · 4 comments
Open

Polars support #2622

MarcoGorelli opened this issue Sep 14, 2024 · 4 comments

Comments

@MarcoGorelli
Copy link
Contributor

Have you considered supporting Polars dataframes as input?

@kylemcmearty
Copy link

Wouldn't it be better to use something like Ibis?

Ibis supports Polars as well as many other backends.

image

@MarcoGorelli
Copy link
Contributor Author

thanks @kylemcmearty

something like Ibis

Great idea - may I suggest taking a look at Narwhals? This is what Altair and scikit-lego use to support multiple dataframe inputs with negligible impact / dependencies / overhead. Disclaimer: i'm the original author of Narwhals, but I'd be happy to put in the work to make this happen if it would be welcome

@tcuongd
Copy link
Collaborator

tcuongd commented Oct 18, 2024

I think it's a good idea but haven't thought about the implementation. Off the top of my head there is some pre-processing and data checks that use pandas DataFrame / Series APIs, although it should be all standard stuff.

How would ibis or Narwhals work? Would we just wrap the input in the common interface, replace all the methods, and produce an output with the same type as the input? Seems fairly safe to me, happy to support it.

@MarcoGorelli
Copy link
Contributor Author

thanks! i'm working on it, have got most of the way, will open a PR when ready

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

No branches or pull requests

3 participants