Type Definition arrow_csv::reader::Reader

source ·
pub type Reader<R> = BufReader<StdBufReader<R>>;
Expand description

CSV file reader using std::io::BufReader

Implementations§

source§

impl<R: Read> Reader<R>

source

pub fn new( reader: R, schema: SchemaRef, has_header: bool, delimiter: Option<u8>, batch_size: usize, bounds: Option<(usize, usize)>, projection: Option<Vec<usize>>, datetime_format: Option<String> ) -> Self

Create a new CsvReader from any value that implements the Read trait.

If reading a File or an input that supports std::io::Read and std::io::Seek; you can customise the Reader, such as to enable schema inference, use ReaderBuilder.

source

pub fn schema(&self) -> SchemaRef

Returns the schema of the reader, useful for getting the schema without reading record batches

source

pub fn from_reader( reader: R, schema: SchemaRef, has_header: bool, delimiter: Option<u8>, batch_size: usize, bounds: Option<(usize, usize)>, projection: Option<Vec<usize>>, datetime_format: Option<String> ) -> Self

👎Deprecated: Use Reader::new or ReaderBuilder

Create a new CsvReader from a Reader

This constructor allows you more flexibility in what records are processed by the csv reader.