```rust fn main() { demo(); }
fn demo() { use pandasrs::pandas::Display; use pandasrs::pandas::Pd; let df = Pd::readcsv("./dataset/rows.csv").unwrap(); //read csv file let col = Pd::getcolumnbyindex(&df, 3); //return sum of column values col.display(); //display in terminal let col = Pd::getcolumn(&df, "Station Latitude"); //return sum of column values let row = Pd::getrowbyindex(&df, 0); //return the index of rows row.display(); //display in terminal let sumcol = Pd::sumcolumn(&df, "Station Latitude"); //return sum of column values let sumrow = Pd::sumrow(&df, 0); //return sum of column values let unique = Pd::unique(&col); unique.display(); //display in terminal // Delete all rows with missing values let newdf = Pd::dropna(&df, "any"); newdf.display(); //display in terminal println!("after dropna:{:?}", &newdf.len()); // after dropna operation println!("head:{:?}", Pd::head(&df, 1)); //return the head 5 element of csvvec println!("tail:{:?}", Pd::tail(&df, 1)); //return the from tail 5 element of csvvec println!("{:?}", sumcol); // return sum of the column "Station Latitude" println!("{:?}", sum_row); // return sum of the column "Station Latitude" } ```