pub fn infer_schema<R: Read + Seek, F: Fn(&[u8]) -> DataType>(
    reader: &mut Reader<R>,
    max_rows: Option<usize>,
    has_header: bool,
    infer: &F
) -> Result<(Vec<Field>, usize)>
Available on (crate features io_csv_read or io_csv_read_async or io_csv_write) and crate feature io_csv_read only.
Expand description

Infers the Fields of a CSV file by reading through the first n records up to max_rows. Also returns the number of rows used to infer. Seeks back to the begining of the file after the header