pub struct IpcWriter<W> { /* private fields */ }
Available on crate feature
polars-io
only.Expand description
Write a DataFrame to Arrow’s IPC format
Example
use polars_core::prelude::*;
use polars_io::ipc::IpcWriter;
use std::fs::File;
use polars_io::SerWriter;
fn example(df: &mut DataFrame) -> PolarsResult<()> {
let mut file = File::create("file.ipc").expect("could not create file");
IpcWriter::new(&mut file)
.finish(df)
}
Implementations§
source§impl<W> IpcWriter<W>where
W: Write,
impl<W> IpcWriter<W>where W: Write,
sourcepub fn with_compression(
self,
compression: Option<IpcCompression>
) -> IpcWriter<W>
pub fn with_compression( self, compression: Option<IpcCompression> ) -> IpcWriter<W>
Set the compression used. Defaults to None.
pub fn batched(self, schema: &Schema) -> Result<BatchedWriter<W>, PolarsError>
Trait Implementations§
Auto Trait Implementations§
impl<W> RefUnwindSafe for IpcWriter<W>where W: RefUnwindSafe,
impl<W> Send for IpcWriter<W>where W: Send,
impl<W> Sync for IpcWriter<W>where W: Sync,
impl<W> Unpin for IpcWriter<W>where W: Unpin,
impl<W> UnwindSafe for IpcWriter<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