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

Integrate Polars library #3334

Closed
albertvillanova opened this issue Nov 29, 2021 · 8 comments · Fixed by #6531
Closed

Integrate Polars library #3334

albertvillanova opened this issue Nov 29, 2021 · 8 comments · Fixed by #6531
Labels
enhancement New feature or request

Comments

@albertvillanova
Copy link
Member

Check potential integration of the Polars library: /~https://github.com/pola-rs/polars

CC: @thomwolf @lewtun

@albertvillanova albertvillanova added the enhancement New feature or request label Nov 29, 2021
@lewtun
Copy link
Member

lewtun commented Nov 29, 2021

If possible, a neat API could be something like Dataset.to_polars(), as well as Dataset.set_format("polars")

@albertvillanova
Copy link
Member Author

Note they use a "custom" implementation of Arrow: Arrow2.

@braaannigan
Copy link

Polars has grown rapidly in popularity over the last year - could you consider integrating the Polars functionality again?

I don't think the "custom" implementation should be a barrier, it still conforms to the Arrow specification

@amrit110
Copy link

Is there some direction regarding this from the HF team @lewtun ? Can conversion from polars to HF dataset be implemented with limited/zero copy? So, something like Dataset.from_polars() and Dataset.to_polars() like you mentioned. Happy to contribute if I can get some pointers on how this may be implemented.

@fzyzcjy
Copy link
Contributor

fzyzcjy commented Mar 16, 2024

Hi, is there any updates? Thanks!

@baggiponte
Copy link

Hi, is there any updates? Thanks!

The feature has been there for a bit 😊 You can call dataset.to_polars() (on a Dataset, not a DatasetDict). The issue can be closed, I guess! @lhoestq

@fzyzcjy
Copy link
Contributor

fzyzcjy commented Aug 30, 2024

Looks great and thanks!

@albertvillanova albertvillanova linked a pull request Aug 31, 2024 that will close this issue
@albertvillanova
Copy link
Member Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants