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(python): Add infer_schema parameter to read_csv / scan_csv #17617

Merged

Conversation

Julian-J-S
Copy link
Contributor

fix #10342

Copy link

codecov bot commented Jul 13, 2024

Codecov Report

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

Project coverage is 80.68%. Comparing base (6816707) to head (4cf80ea).
Report is 5 commits behind head on main.

Files Patch % Lines
py-polars/polars/io/csv/functions.py 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17617      +/-   ##
==========================================
+ Coverage   80.65%   80.68%   +0.03%     
==========================================
  Files        1484     1484              
  Lines      195511   195406     -105     
  Branches     2781     2781              
==========================================
- Hits       157685   157661      -24     
+ Misses      37315    37234      -81     
  Partials      511      511              

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

@ritchie46
Copy link
Member

Thanks. I think we need to do the same for scan_csv.

@Julian-J-S Julian-J-S changed the title feat(python): add infer_schema parameter to read_csv feat(python): add infer_schema parameter to read_csv / scan_csv Jul 14, 2024
@Julian-J-S Julian-J-S changed the title feat(python): add infer_schema parameter to read_csv / scan_csv feat(python): Add infer_schema parameter to read_csv / scan_csv Jul 14, 2024
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars and removed title needs formatting labels Jul 14, 2024
@mcrumiller
Copy link
Contributor

Random question, but what happens if someone uses infer_schema=True along with infer_schema_length=0? Same with infer_schema=False / infer_schema_length=n where n>0. Maybe a quick check with a raised exception? Something like infer_schema_length cannot be 0 when infer_schema is True?

@ritchie46
Copy link
Member

ritchie46 commented Jul 14, 2024

0 is a valid length. That doesn't change. When you set infer_schema=False, we ignore the length.

@ritchie46 ritchie46 merged commit 7f5d9c7 into pola-rs:main Jul 15, 2024
15 of 16 checks passed
@Julian-J-S Julian-J-S deleted the feat-add-infer-schema-parameter-to-read-csv branch July 20, 2024 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read_csv: add infer_schema parameter
3 participants