[−][src]Struct arrow::csv::reader::ReaderBuilder
CSV file reader builder
Methods
impl ReaderBuilder
[src]
pub fn new() -> ReaderBuilder
[src]
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 }
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<R: Read + Seek>(self, reader: R) -> Result<Reader<R>>
[src]
Create a new Reader
from the ReaderBuilder
Trait Implementations
impl Default for ReaderBuilder
[src]
fn default() -> ReaderBuilder
[src]
Auto Trait Implementations
impl Sync for ReaderBuilder
impl Unpin for ReaderBuilder
impl Send for ReaderBuilder
impl UnwindSafe for ReaderBuilder
impl RefUnwindSafe for ReaderBuilder
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> FromCast<T> for T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,