pub struct CsvWriter<W: Write> { /* private fields */ }
Available on crate features
csv-file
or json
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 has_header(self, has_header: bool) -> Self
pub fn has_header(self, has_header: bool) -> Self
Set whether to write headers
sourcepub fn with_delimiter(self, delimiter: u8) -> Self
pub fn with_delimiter(self, delimiter: u8) -> Self
Set the CSV file’s column delimiter as a byte character
pub fn with_batch_size(self, batch_size: usize) -> Self
sourcepub fn with_date_format(self, format: Option<String>) -> Self
pub fn with_date_format(self, format: Option<String>) -> Self
Set the CSV file’s date format
sourcepub fn with_time_format(self, format: Option<String>) -> Self
pub fn with_time_format(self, format: Option<String>) -> Self
Set the CSV file’s time format
sourcepub fn with_datetime_format(self, format: Option<String>) -> Self
pub fn with_datetime_format(self, format: Option<String>) -> Self
Set the CSV file’s datetime format
sourcepub fn with_float_precision(self, precision: Option<usize>) -> Self
pub fn with_float_precision(self, precision: Option<usize>) -> Self
Set the CSV file’s float precision
sourcepub fn with_quoting_char(self, char: u8) -> Self
pub fn with_quoting_char(self, char: u8) -> Self
Set the single byte character used for quoting
sourcepub fn with_null_value(self, null_value: String) -> Self
pub fn with_null_value(self, null_value: String) -> Self
Set the CSV file’s null value representation