Struct polars::prelude::ParquetReader
source · [−]Expand description
Read Apache parquet format into a DataFrame.
Implementations
sourceimpl<R> ParquetReader<R> where
R: MmapBytesReader,
impl<R> ParquetReader<R> where
R: MmapBytesReader,
pub fn finish_with_scan_ops(
self,
predicate: Option<Arc<dyn PhysicalIoExpr + 'static>>,
aggregate: Option<&[ScanAggregation]>,
projection: Option<&[usize]>
) -> Result<DataFrame, PolarsError>
sourcepub fn read_parallel(self, parallel: bool) -> ParquetReader<R>
pub fn read_parallel(self, parallel: bool) -> ParquetReader<R>
Read the parquet file in parallel (default). The single threaded reader consumes less memory.
sourcepub fn with_n_rows(self, num_rows: Option<usize>) -> ParquetReader<R>
pub fn with_n_rows(self, num_rows: Option<usize>) -> ParquetReader<R>
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, Global>>
) -> ParquetReader<R>
pub fn with_columns(
self,
columns: Option<Vec<String, Global>>
) -> ParquetReader<R>
Columns to select/ project
sourcepub fn with_projection(
self,
projection: Option<Vec<usize, Global>>
) -> ParquetReader<R>
pub fn with_projection(
self,
projection: Option<Vec<usize, Global>>
) -> ParquetReader<R>
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>) -> ParquetReader<R>
pub fn with_row_count(self, row_count: Option<RowCount>) -> ParquetReader<R>
Add a row_count
column.
pub fn schema(self) -> Result<Schema, PolarsError>
Trait Implementations
sourceimpl<R> SerReader<R> for ParquetReader<R> where
R: MmapBytesReader,
impl<R> SerReader<R> for ParquetReader<R> where
R: MmapBytesReader,
fn new(reader: R) -> ParquetReader<R>
sourcefn set_rechunk(self, rechunk: bool) -> ParquetReader<R>
fn set_rechunk(self, rechunk: bool) -> ParquetReader<R>
Rechunk to a single chunk after Reading file.
sourcefn finish(self) -> Result<DataFrame, PolarsError>
fn finish(self) -> Result<DataFrame, PolarsError>
Take the SerReader and return a parsed DataFrame.
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