Function polars_io::csv_core::utils::infer_file_schema [−][src]
pub fn infer_file_schema(
reader_bytes: &ReaderBytes<'_>,
delimiter: u8,
max_read_records: Option<usize>,
has_header: bool,
schema_overwrite: Option<&Schema>,
skip_rows: &mut usize,
comment_char: Option<u8>,
quote_char: Option<u8>
) -> Result<(Schema, usize)>
This is supported on crate features
csv-file
and private
only.Expand description
Infer the schema of a CSV file by reading through the first n records of the file,
with max_read_records
controlling the maximum number of records to read.
If max_read_records
is not set, the whole file is read to infer its schema.
Return inferred schema and number of records used for inference.