Struct polars_io::partition::PartitionedWriter
source · pub struct PartitionedWriter<F> { /* private fields */ }Expand description
Write a DataFrame with disk partitioning
Example
use polars_core::prelude::*;
use polars_io::ipc::IpcWriterOption;
use polars_io::partition::PartitionedWriter;
fn example(df: &mut DataFrame) -> PolarsResult<()> {
let option = IpcWriterOption::default();
PartitionedWriter::new(option, "./rootdir", ["a", "b"])
.finish(df)
}Implementations§
source§impl<F> PartitionedWriter<F>where
F: WriterFactory + Send + Sync,
impl<F> PartitionedWriter<F>where
F: WriterFactory + Send + Sync,
pub fn new<P, I, S>(option: F, rootdir: P, by: I) -> Selfwhere
P: Into<PathBuf>,
I: IntoIterator<Item = S>,
S: AsRef<str>,
sourcepub fn with_parallel(self, parallel: bool) -> Self
pub fn with_parallel(self, parallel: bool) -> Self
Write the parquet file in parallel (default).