pub struct CsvWriter<W>where
    W: Write,{ /* private fields */ }Available on crate feature 
polars-io only.Expand description
Write a DataFrame to csv.
Don’t use a Buffered writer, the CsvWriter internally already buffers writes.
Implementations§
source§impl<W> CsvWriter<W>where
    W: Write,
 
impl<W> CsvWriter<W>where
    W: Write,
sourcepub fn include_bom(self, include_bom: bool) -> CsvWriter<W>
 
pub fn include_bom(self, include_bom: bool) -> CsvWriter<W>
Set whether to write UTF-8 BOM.
sourcepub fn include_header(self, include_header: bool) -> CsvWriter<W>
 
pub fn include_header(self, include_header: bool) -> CsvWriter<W>
Set whether to write headers.
sourcepub fn with_separator(self, separator: u8) -> CsvWriter<W>
 
pub fn with_separator(self, separator: u8) -> CsvWriter<W>
Set the CSV file’s column separator as a byte character.
sourcepub fn with_batch_size(self, batch_size: NonZero<usize>) -> CsvWriter<W>
 
pub fn with_batch_size(self, batch_size: NonZero<usize>) -> CsvWriter<W>
Set the batch size to use while writing the CSV.
sourcepub fn with_date_format(self, format: Option<String>) -> CsvWriter<W>
 
pub fn with_date_format(self, format: Option<String>) -> CsvWriter<W>
Set the CSV file’s date format.
sourcepub fn with_time_format(self, format: Option<String>) -> CsvWriter<W>
 
pub fn with_time_format(self, format: Option<String>) -> CsvWriter<W>
Set the CSV file’s time format.
sourcepub fn with_datetime_format(self, format: Option<String>) -> CsvWriter<W>
 
pub fn with_datetime_format(self, format: Option<String>) -> CsvWriter<W>
Set the CSV file’s datetime format.
sourcepub fn with_float_precision(self, precision: Option<usize>) -> CsvWriter<W>
 
pub fn with_float_precision(self, precision: Option<usize>) -> CsvWriter<W>
Set the CSV file’s float precision.
sourcepub fn with_quote_char(self, char: u8) -> CsvWriter<W>
 
pub fn with_quote_char(self, char: u8) -> CsvWriter<W>
Set the single byte character used for quoting.
sourcepub fn with_null_value(self, null_value: String) -> CsvWriter<W>
 
pub fn with_null_value(self, null_value: String) -> CsvWriter<W>
Set the CSV file’s null value representation.
sourcepub fn with_line_terminator(self, line_terminator: String) -> CsvWriter<W>
 
pub fn with_line_terminator(self, line_terminator: String) -> CsvWriter<W>
Set the CSV file’s line terminator.
sourcepub fn with_quote_style(self, quote_style: QuoteStyle) -> CsvWriter<W>
 
pub fn with_quote_style(self, quote_style: QuoteStyle) -> CsvWriter<W>
Set the CSV file’s quoting behavior.
See more on QuoteStyle.
pub fn n_threads(self, n_threads: usize) -> CsvWriter<W>
pub fn batched(self, schema: &Schema) -> Result<BatchedWriter<W>, PolarsError>
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for CsvWriter<W>where
    W: Freeze,
impl<W> RefUnwindSafe for CsvWriter<W>where
    W: RefUnwindSafe,
impl<W> Send for CsvWriter<W>where
    W: Send,
impl<W> Sync for CsvWriter<W>where
    W: Sync,
impl<W> Unpin for CsvWriter<W>where
    W: Unpin,
impl<W> UnwindSafe for CsvWriter<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