Struct arrow::csv::reader::ReaderBuilder [−][src]
pub struct ReaderBuilder { /* fields omitted */ }
Expand description
CSV file reader builder
Implementations
Create a new builder for configuring CSV parsing options.
To convert a builder into a reader, call ReaderBuilder::build
Example
extern crate arrow;
use arrow::csv;
use std::fs::File;
fn example() -> csv::Reader<File> {
let file = File::open("test/data/uk_cities_with_headers.csv").unwrap();
// create a builder, inferring the schema with the first 100 records
let builder = csv::ReaderBuilder::new().infer_schema(Some(100));
let reader = builder.build(file).unwrap();
reader
}
Set the CSV file’s schema
Set whether the CSV file has headers
Set the CSV file’s column delimiter as a byte character
Set the CSV reader to infer the schema of the file
Set the batch size (number of records to load at one time)
Set the reader’s column projection