Skip to content

Commit

Permalink
refactor(rust!): Move CSV read options from CsvReader to `CsvReadOp…
Browse files Browse the repository at this point in the history
…tions` (#16126)
  • Loading branch information
nameexhaustion authored May 10, 2024
1 parent c4e8678 commit c1a1a01
Show file tree
Hide file tree
Showing 37 changed files with 952 additions and 735 deletions.
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

0 comments on commit c1a1a01

Please sign in to comment.