pub fn infer_file_schema<R: Read + Seek>(
reader: R,
delimiter: u8,
max_read_records: Option<usize>,
has_header: bool,
) -> Result<(Schema, usize), ArrowError>
👎Deprecated: Use Format::infer_schema
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. This function does not change reader cursor offset.
The inferred schema will always have each field set as nullable.