Struct polars::prelude::ParquetWriter  
source · pub struct ParquetWriter<W> { /* private fields */ }Available on crate feature 
polars-io 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 new(writer: W) -> ParquetWriter<W>where
    W: Write,
 
pub fn new(writer: W) -> ParquetWriter<W>where
    W: Write,
Create a new writer
sourcepub fn with_compression(
    self,
    compression: ParquetCompression
) -> ParquetWriter<W>
 
pub fn with_compression( self, compression: ParquetCompression ) -> ParquetWriter<W>
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) -> ParquetWriter<W>
 
pub fn with_statistics(self, statistics: StatisticsOptions) -> ParquetWriter<W>
Compute and write statistic
sourcepub fn with_row_group_size(self, size: Option<usize>) -> ParquetWriter<W>
 
pub fn with_row_group_size(self, size: Option<usize>) -> ParquetWriter<W>
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>) -> ParquetWriter<W>
 
pub fn with_data_page_size(self, limit: Option<usize>) -> ParquetWriter<W>
Sets the maximum bytes size of a data page. If None will be 1024^2 bytes.
sourcepub fn set_parallel(self, parallel: bool) -> ParquetWriter<W>
 
pub fn set_parallel(self, parallel: bool) -> ParquetWriter<W>
Serialize columns in parallel
pub fn batched(self, schema: &Schema) -> Result<BatchedWriter<W>, PolarsError>
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
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