pub fn write_table_csv<P: AsRef<Path>>(
df: &mut DataFrame,
path: P,
header: bool,
) -> Result<(), PineappleError>Expand description
Write a table to a CSV file
§Arguments
df- A DataFrameoutput- A string containing the name of the output fileheader- A boolean indicating whether the output file should contain a header
§Examples
use polars::prelude::*;
use pineapple_core::io::write_table_csv;
let column = vec![Column::new("area".into(), [2.5, 3.1, 3.4])];
let mut df: DataFrame = DataFrame::new(column).unwrap();
write_table_csv(&mut df, "output.csv", true).unwrap()