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
Reader | CSV file reader |
ReaderBuilder | CSV file reader builder |
Functions
infer_file_schema | Infer the schema of a CSV file by reading through the first n records of the file,
with |
infer_reader_schema | Infer schema of CSV records provided by struct that implements |
infer_schema_from_files | Infer schema from a list of CSV files by reading through first n records
with |