Struct polars::prelude::WriterBuilder [−]
pub struct WriterBuilder { /* fields omitted */ }
Expand description
A CSV writer builder
Implementations
impl WriterBuilder
impl WriterBuilder
pub fn new() -> WriterBuilder
pub fn new() -> WriterBuilder
Create a new builder for configuring CSV writing options.
To convert a builder into a writer, call WriterBuilder::build
Example
extern crate arrow; use arrow::csv; use std::fs::File; fn example() -> csv::Writer<File> { let file = File::create("target/out.csv").unwrap(); // create a builder that doesn't write headers let builder = csv::WriterBuilder::new().has_headers(false); let writer = builder.build(file); writer }
pub fn has_headers(self, has_headers: bool) -> WriterBuilder
pub fn has_headers(self, has_headers: bool) -> WriterBuilder
Set whether to write headers
pub fn with_delimiter(self, delimiter: u8) -> WriterBuilder
pub fn with_delimiter(self, delimiter: u8) -> WriterBuilder
Set the CSV file’s column delimiter as a byte character
pub fn with_date_format(self, format: String) -> WriterBuilder
pub fn with_date_format(self, format: String) -> WriterBuilder
Set the CSV file’s date format
pub fn with_time_format(self, format: String) -> WriterBuilder
pub fn with_time_format(self, format: String) -> WriterBuilder
Set the CSV file’s time format
pub fn with_timestamp_format(self, format: String) -> WriterBuilder
pub fn with_timestamp_format(self, format: String) -> WriterBuilder
Set the CSV file’s timestamp format
Trait Implementations
impl Debug for WriterBuilder
impl Debug for WriterBuilder
impl Default for WriterBuilder
impl Default for WriterBuilder
pub fn default() -> WriterBuilder
pub fn default() -> WriterBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for WriterBuilder
impl Send for WriterBuilder
impl Sync for WriterBuilder
impl Unpin for WriterBuilder
impl UnwindSafe for WriterBuilder