Available on crate features
csv
or json
only.Expand description
Functionality for reading CSV files.
§Examples
use polars_core::prelude::*;
use polars_io::prelude::*;
use std::fs::File;
fn example() -> PolarsResult<DataFrame> {
// Prefer `from_path` over `new` as it is faster.
CsvReadOptions::default()
.with_has_header(true)
.try_into_reader_with_file_path(Some("example.csv".into()))?
.finish()
}
Re-exports§
pub use schema_inference::infer_file_schema;
Modules§
Structs§
- Create a new DataFrame by reading a csv file.
Enums§
Functions§
- Read the number of rows without parsing columns useful for count(*) queries
- check if csv file is compressed