Struct polars_io::parquet::write::ParquetWriter
source · pub struct ParquetWriter<W> { /* private fields */ }Available on crate feature
parquet only.Expand description
Write a DataFrame to Parquet format.
Implementations§
source§impl<W> ParquetWriter<W>where
W: Write,
impl<W> ParquetWriter<W>where
W: Write,
sourcepub fn with_compression(self, compression: ParquetCompression) -> Self
pub fn with_compression(self, compression: ParquetCompression) -> Self
Set the compression used. Defaults to Zstd.
The default compression Zstd has very good performance, but may not yet been supported
by older readers. If you want more compatibility guarantees, consider using Snappy.
sourcepub fn with_statistics(self, statistics: StatisticsOptions) -> Self
pub fn with_statistics(self, statistics: StatisticsOptions) -> Self
Compute and write statistic
sourcepub fn with_row_group_size(self, size: Option<usize>) -> Self
pub fn with_row_group_size(self, size: Option<usize>) -> Self
Set the row group size (in number of rows) during writing. This can reduce memory pressure and improve writing performance.
sourcepub fn with_data_page_size(self, limit: Option<usize>) -> Self
pub fn with_data_page_size(self, limit: Option<usize>) -> Self
Sets the maximum bytes size of a data page. If None will be 1024^2 bytes.
sourcepub fn set_parallel(self, parallel: bool) -> Self
pub fn set_parallel(self, parallel: bool) -> Self
Serialize columns in parallel
pub fn batched(self, schema: &Schema) -> PolarsResult<BatchedWriter<W>>
Auto Trait Implementations§
impl<W> Freeze for ParquetWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for ParquetWriter<W>where
W: RefUnwindSafe,
impl<W> Send for ParquetWriter<W>where
W: Send,
impl<W> Sync for ParquetWriter<W>where
W: Sync,
impl<W> Unpin for ParquetWriter<W>where
W: Unpin,
impl<W> UnwindSafe for ParquetWriter<W>where
W: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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