write_table

Function write_table 

Source
pub fn write_table<P: AsRef<Path>>(
    df: &mut DataFrame,
    path: P,
) -> Result<(), PineappleError>
Expand description

Write a DataFrame to disk

§Arguments

  • df - A DataFrame
  • output - A string containing the name of the output file
  • id - An optional string specifying a single id to prepend as first column

§Examples

use polars::prelude::*;
use pineapple_core::io::write_table;

let column = vec![Column::new("area".into(), [2.5, 3.1, 3.4])];
let mut df: DataFrame = DataFrame::new(column).unwrap();

write_table(&mut df, "output.csv").unwrap()