pub struct ParquetReader { /* private fields */ }Expand description
A Parquet file reader.
Uses a fluent builder pattern: construct with ParquetReader::new, chain
optional configuration methods, then call ParquetReader::finish to load
the data into a DataFrame.
§Example
use plotlars_core::io::ParquetReader;
let df = ParquetReader::new("data/sales.parquet").finish().unwrap();Implementations§
Source§impl ParquetReader
impl ParquetReader
Sourcepub fn new(path: impl AsRef<Path>) -> Self
pub fn new(path: impl AsRef<Path>) -> Self
Create a new Parquet reader for the given file path.
Sourcepub fn columns(self, columns: Vec<&str>) -> Self
pub fn columns(self, columns: Vec<&str>) -> Self
Select specific columns to load (projection pushdown).
Sourcepub fn finish(self) -> Result<DataFrame, PlotlarsError>
pub fn finish(self) -> Result<DataFrame, PlotlarsError>
Execute the read and return a DataFrame.
§Errors
Returns PlotlarsError::ParquetParse if the file cannot be read or parsed.
Trait Implementations§
Source§impl Clone for ParquetReader
impl Clone for ParquetReader
Source§fn clone(&self) -> ParquetReader
fn clone(&self) -> ParquetReader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParquetReader
impl RefUnwindSafe for ParquetReader
impl Send for ParquetReader
impl Sync for ParquetReader
impl Unpin for ParquetReader
impl UnsafeUnpin for ParquetReader
impl UnwindSafe for ParquetReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more