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

Add support for polars #83

Closed
dalonsoa opened this issue Oct 1, 2024 · 5 comments · Fixed by #94
Closed

Add support for polars #83

dalonsoa opened this issue Oct 1, 2024 · 5 comments · Fixed by #94
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest
Milestone

Comments

@dalonsoa
Copy link
Collaborator

dalonsoa commented Oct 1, 2024

Problem

polars has become recently a very attractive - and faster - alternative to pandas, so we should support it, as well.

Solution

Largely copying what's in place for pandas, implement support for reading data into a polars dataframe with read_csv and from a polars dataframe with write_csv.

@AdrianDAlessandro
Copy link
Contributor

I'll take this. I believe the best way to do this is to start using narwhals (which provides a dataframe-agnostic API). There doesn't appear to be support for a read_csv in Narwhals, but there is a write_csv that we can use.

@dalonsoa
Copy link
Collaborator Author

dalonsoa commented Oct 1, 2024

If there's no read_csv, how are you planning to proceed for creating polars dataframes?

@AdrianDAlessandro
Copy link
Contributor

I will implement it using the read_csv from polars. This will probably be two separate PRs, one for read and one for write.

@dalonsoa
Copy link
Collaborator Author

dalonsoa commented Oct 1, 2024

But that will add two dependencies rather than just one, polars. Isn't it a bit overkilling to use narwhals in this case, specially considering that it only implements half of what we need?

@AdrianDAlessandro
Copy link
Contributor

I'll do it just with polars for now and open a separate issue about narwhals

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

Successfully merging a pull request may close this issue.

2 participants