Module polars_io::csv::write

source ·
Available on crate features csv or json only.
Expand description

Functionality for writing CSV files.

§Examples

use polars_core::prelude::*;
use polars_io::prelude::*;
use std::fs::File;

fn example(df: &mut DataFrame) -> PolarsResult<()> {
    let mut file = File::create("example.csv").expect("could not create file");

    CsvWriter::new(&mut file)
        .include_header(true)
        .with_separator(b',')
        .finish(df)
}

Structs§

Enums§

  • Quote style indicating when to insert quotes around a field.