Struct polars_io::parquet::ParquetReader
source · [−]Expand description
Read Apache parquet format into a DataFrame.
Implementations
sourceimpl<R: MmapBytesReader> ParquetReader<R>
impl<R: MmapBytesReader> ParquetReader<R>
pub fn finish_with_scan_ops(
self,
predicate: Option<Arc<dyn PhysicalIoExpr>>,
aggregate: Option<&[ScanAggregation]>,
projection: Option<&[usize]>
) -> Result<DataFrame>
sourcepub fn read_parallel(self, parallel: bool) -> Self
pub fn read_parallel(self, parallel: bool) -> Self
Read the parquet file in parallel (default). The single threaded reader consumes less memory.
sourcepub fn with_n_rows(self, num_rows: Option<usize>) -> Self
pub fn with_n_rows(self, num_rows: Option<usize>) -> Self
Stop parsing when n
rows are parsed. By settings this parameter the csv will be parsed
sequentially.
sourcepub fn with_columns(self, columns: Option<Vec<String>>) -> Self
pub fn with_columns(self, columns: Option<Vec<String>>) -> Self
Columns to select/ project
sourcepub fn with_projection(self, projection: Option<Vec<usize>>) -> Self
pub fn with_projection(self, projection: Option<Vec<usize>>) -> Self
Set the reader’s column projection. This counts from 0, meaning that
vec![0, 4]
would select the 1st and 5th column.
sourcepub fn with_row_count(self, row_count: Option<RowCount>) -> Self
pub fn with_row_count(self, row_count: Option<RowCount>) -> Self
Add a row_count
column.
pub fn schema(self) -> Result<Schema>
Trait Implementations
sourceimpl<R: MmapBytesReader> SerReader<R> for ParquetReader<R>
impl<R: MmapBytesReader> SerReader<R> for ParquetReader<R>
Auto Trait Implementations
impl<R> RefUnwindSafe for ParquetReader<R> where
R: RefUnwindSafe,
impl<R> Send for ParquetReader<R> where
R: Send,
impl<R> Sync for ParquetReader<R> where
R: Sync,
impl<R> Unpin for ParquetReader<R> where
R: Unpin,
impl<R> UnwindSafe for ParquetReader<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more