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 .with_options() method to CsvReader for easier configuration #21681

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

silannisik
Copy link

This PR implements a new .with_options() method for CsvReader to allow custom CSV read options.

Although the existing into_reader_with_file_handle function from CsvReadOptions is useful for applying custom options, this PR introduces a helper function directly on CsvReader. This new function aims simplifying adding custom csv options—similar to how CsvWriter provides its own helper methods.

Fixes #16749.

Please feel free to let me know if you have any suggestions about this PR.

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.49%. Comparing base (9092a0e) to head (0905540).

Files with missing lines Patch % Lines
crates/polars-io/src/csv/read/reader.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #21681   +/-   ##
=======================================
  Coverage   80.48%   80.49%           
=======================================
  Files        1605     1605           
  Lines      231858   231862    +4     
  Branches     2678     2678           
=======================================
+ Hits       186622   186639   +17     
+ Misses      44606    44594   -12     
+ Partials      630      629    -1     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@silannisik silannisik changed the title Fixes #16749 Add .with_options() method to CsvReader for easier configuration Add .with_options() method to CsvReader for easier configuration Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Construct CsvReader from bytestream using CsvReadOptions
1 participant