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

fix: Fix error reading lists of CSV files that contain comments #16426

Merged
merged 2 commits into from
May 23, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented May 23, 2024

Fixes #16327

Turns out I just had to remove the skip_rows overwrite to make it correct because this exists:

// skip lines that are comments
while is_comment_line(bytes, self.comment_prefix.as_ref()) {
bytes = skip_this_line(bytes, quote_char, eol_char);
}

was this your plan all along Ritchie 😂

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.41%. Comparing base (8dc104a) to head (f8cf178).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16426      +/-   ##
==========================================
- Coverage   81.43%   81.41%   -0.03%     
==========================================
  Files        1409     1409              
  Lines      184567   184565       -2     
  Branches     2962     2962              
==========================================
- Hits       150308   150263      -45     
- Misses      33743    33787      +44     
+ Partials      516      515       -1     

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

@nameexhaustion nameexhaustion changed the title Csv comments fix: Fix error reading lists of CSV files with comments May 23, 2024
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels May 23, 2024
@nameexhaustion nameexhaustion marked this pull request as ready for review May 23, 2024 07:05
@nameexhaustion nameexhaustion changed the title fix: Fix error reading lists of CSV files with comments fix: Fix error reading lists of CSV files that contain comments May 23, 2024
@ritchie46
Copy link
Member

Easy right?! 🤣

@ritchie46 ritchie46 merged commit f0e38b5 into pola-rs:main May 23, 2024
30 checks passed
@nameexhaustion nameexhaustion deleted the csv-comments branch May 23, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scan_csv skips data rows when scanning lists of CSV files with comments
2 participants