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

refactor(rust!): Move CSV read options from CsvReader to CsvReadOptions #16126

Merged
merged 14 commits into from
May 10, 2024
10 changes: 4 additions & 6 deletions crates/polars-io/src/csv/read/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//! Functionality for reading CSV files.
//!
//! Note: currently, `CsvReader::new` has an extra copy. If you want optimal performance,
//! it is advised to use [`CsvReader::from_path`] instead.
//!
//! # Examples
//!
//! ```
Expand All @@ -12,8 +9,9 @@
//!
//! fn example() -> PolarsResult<DataFrame> {
//! // Prefer `from_path` over `new` as it is faster.
//! CsvReader::from_path("example.csv")?
//! .has_header(true)
//! CsvReadOptions::default()
//! .with_has_header(true)
//! .try_into_reader_with_file_path(Some("example.csv".into()))?
//! .finish()
//! }
//! ```
Expand All @@ -26,7 +24,7 @@ mod reader;
mod splitfields;
mod utils;

pub use options::{CommentPrefix, CsvEncoding, CsvReaderOptions, NullValues};
pub use options::{CommentPrefix, CsvEncoding, CsvParseOptions, CsvReadOptions, NullValues};
pub use parser::count_rows;
pub use read_impl::batched_mmap::{BatchedCsvReaderMmap, OwnedBatchedCsvReaderMmap};
pub use read_impl::batched_read::{BatchedCsvReaderRead, OwnedBatchedCsvReader};
Expand Down
Loading