General Mathematics Library for Rust,Inspired by Python Pandas Library.
Examples
fn main() {
demo();
}
fn demo() {
use pandas_rs::prelude::*;
let df = Pd::read_csv("./dataset/rows.csv").unwrap();
let col = Pd::get_column_by_index(&df, 3);
col.display();
let col = Pd::get_column(&df, "Station Latitude");
let row = Pd::get_row_by_index(&df, 0);
row.display();
let sum_col = Pd::sum_column(&df, "Station Latitude");
let sum_row = Pd::sum_row(&df, 0);
let unique = Pd::unique(&col);
unique.display();
let new_df = Pd::dropna(&df, "any");
new_df.display();
Pd::save_csv(df.clone(), "./new_df.csv");
println!("after dropna:{:?}", &new_df.len());
println!("head:{:?}", Pd::head(&df, 1));
println!("tail:{:?}", Pd::tail(&df, 1));
println!("{:?}", sum_col);
println!("{:?}", sum_row);
}