Module arrow::csv::reader [−][src]
Expand description
CSV Reader
This CSV reader allows CSV files to be read into the Arrow memory model. Records are loaded in batches and are then converted from row-based data to columnar data.
Example:
use arrow::csv; use arrow::datatypes::{DataType, Field, Schema}; use std::fs::File; use std::sync::Arc; let schema = Schema::new(vec![ Field::new("city", DataType::Utf8, false), Field::new("lat", DataType::Float64, false), Field::new("lng", DataType::Float64, false), ]); let file = File::open("test/data/uk_cities.csv").unwrap(); let mut csv = csv::Reader::new(file, Arc::new(schema), false, None, 1024, None, None); let batch = csv.next().unwrap().unwrap();
Structs
Functions
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.
Infer schema of CSV records provided by struct that implements Read
trait.
Infer schema from a list of CSV files by reading through first n records
with max_read_records
controlling the maximum number of records to read.