[−][src]Struct arrow::csv::reader::ReaderBuilder
CSV file reader builder
Methods
impl ReaderBuilder
[src]
impl ReaderBuilder
pub fn new() -> ReaderBuilder | [src] |
Create a new builder for configuring CSV parsing options.
To convert a builder into a reader, call Reader::from_builder
Example
extern crate arrow; use arrow::csv; use std::fs::File; fn example() -> csv::Reader { 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 }
pub fn with_schema(self, schema: Arc<Schema>) -> Self | [src] |
Set the CSV file's schema
pub fn has_headers(self, has_headers: bool) -> Self | [src] |
Set whether the CSV file has headers
pub fn with_delimiter(self, delimiter: u8) -> Self | [src] |
Set the CSV file's column delimiter as a byte character
pub fn infer_schema(self, max_records: Option<usize>) -> Self | [src] |
Set the CSV reader to infer the schema of the file
pub fn with_batch_size(self, batch_size: usize) -> Self | [src] |
Set the batch size (number of records to load at one time)
pub fn with_projection(self, projection: Vec<usize>) -> Self | [src] |
Set the reader's column projection
pub fn build(self, file: File) -> Result<Reader> | [src] |
Create a new Reader
from the ReaderBuilder
Trait Implementations
impl Default for ReaderBuilder
[src]
impl Default for ReaderBuilder
fn default() -> ReaderBuilder | [src] |
Auto Trait Implementations
impl Send for ReaderBuilder
impl Send for ReaderBuilder
impl Sync for ReaderBuilder
impl Sync for ReaderBuilder
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |