pub fn infer_file_schema(
    reader_bytes: &ReaderBytes<'_>,
    delimiter: u8,
    max_read_lines: Option<usize>,
    has_header: bool,
    schema_overwrite: Option<&Schema>,
    skip_rows: &mut usize,
    comment_char: Option<u8>,
    quote_char: Option<u8>,
    null_values: Option<&NullValues>,
    parse_dates: bool
) -> Result<(Schema, usize)>
Available on crate feature csv-file 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.