Struct polars_io::avro::AvroWriter
source · [−]pub struct AvroWriter<W> { /* private fields */ }
Available on crate feature
avro
only.Expand description
Write a DataFrame to Apache Avro format
Example
use polars_core::prelude::*;
use polars_io::avro::AvroWriter;
use std::fs::File;
use polars_io::SerWriter;
fn example(df: &mut DataFrame) -> Result<()> {
let mut file = File::create("file.avro").expect("could not create file");
AvroWriter::new(&mut file)
.finish(df)
}
Implementations
sourceimpl<W> AvroWriter<W> where
W: Write,
impl<W> AvroWriter<W> where
W: Write,
sourcepub fn with_compression(self, compression: Option<Compression>) -> Self
pub fn with_compression(self, compression: Option<Compression>) -> Self
Set the compression used. Defaults to None.
Trait Implementations
Auto Trait Implementations
impl<W> RefUnwindSafe for AvroWriter<W> where
W: RefUnwindSafe,
impl<W> Send for AvroWriter<W> where
W: Send,
impl<W> Sync for AvroWriter<W> where
W: Sync,
impl<W> Unpin for AvroWriter<W> where
W: Unpin,
impl<W> UnwindSafe for AvroWriter<W> where
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more