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

feat: Enable more dispatch to scan_csv from read_csv #19600

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Nov 2, 2024

Experiment to see what would break

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Nov 2, 2024
Copy link

codecov bot commented Nov 2, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.79%. Comparing base (1d5c640) to head (9bff811).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
py-polars/polars/io/csv/functions.py 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19600      +/-   ##
==========================================
- Coverage   79.83%   79.79%   -0.05%     
==========================================
  Files        1536     1536              
  Lines      211357   211357              
  Branches     2445     2449       +4     
==========================================
- Hits       168744   168650      -94     
- Misses      42058    42148      +90     
- Partials      555      559       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nameexhaustion nameexhaustion added do not merge This pull requests should not be merged right now reference Reference issue for recurring topics labels Nov 3, 2024
@@ -385,7 +383,7 @@ def test_dtype_overwrite_with_column_name_selection() -> None:
)
f = io.StringIO(csv)
df = pl.read_csv(f, columns=["c", "b", "d"], schema_overrides=[pl.Int32, pl.String])
assert df.dtypes == [pl.String, pl.Int32, pl.Int64]
Copy link
Collaborator Author

@nameexhaustion nameexhaustion Nov 3, 2024

Choose a reason for hiding this comment

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

read_csv currently sorts the projection based on column position in the file, which is a bit tricky to handle without breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge This pull requests should not be merged right now enhancement New feature or an improvement of an existing feature python Related to Python Polars reference Reference issue for recurring topics rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant