Skip to content
New issue

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

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

Already on GitHub? # to your account

Include support for polars #94

Merged
merged 6 commits into from
Oct 1, 2024
Merged

Include support for polars #94

merged 6 commits into from
Oct 1, 2024

Conversation

AdrianDAlessandro
Copy link
Contributor

@AdrianDAlessandro AdrianDAlessandro commented Oct 1, 2024

This PR adds a function that will read a csv into a polars LazyFrame or DataFrame, depending on if the "eager" parameter is true or false. It also includes a write_polars function.

Some comments:

  • There is a lot of repeated code for each of the read options. They all read the headers and the the data frame detail. It might be good to unify this
  • This partially addresses Add support for polars #83, it has not implemented the write functionality yet. Edited: Now includes write functionality.

Close #83

Copy link
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks ok, but update with the base branch to make sure all runs as expected. For now, all checks are failing.

@AdrianDAlessandro AdrianDAlessandro changed the title Include a read_to_polars function Include support for polars Oct 1, 2024
Copy link
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Could you add a mention to polars in the README, alongside the other "engines"? Is the only documentation we have, for now.

csvy/readers.py Outdated Show resolved Hide resolved
Co-authored-by: Diego Alonso Álvarez <6095790+dalonsoa@users.noreply.github.com>
# Conflicts:
#	csvy/__init__.py
#	poetry.lock
#	pyproject.toml
@dalonsoa dalonsoa merged commit 0e2b18c into develop Oct 1, 2024
5 checks passed
@dalonsoa dalonsoa deleted the polars branch October 1, 2024 14:45
AdrianDAlessandro added a commit that referenced this pull request Oct 1, 2024
Following on from #94, this PR mentions polars in the readme to document its use.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for polars
2 participants