pub struct DataFrame { /* private fields */ }Expand description
A dataframe struct similar to pythons pandas dataframe
Implementations§
source§impl DataFrame
impl DataFrame
sourcepub fn add_column(&mut self, name: &str, data: &Vec<i128>)
pub fn add_column(&mut self, name: &str, data: &Vec<i128>)
Adds a column to the dataframe
sourcepub fn get_columns(&self) -> Vec<String>
pub fn get_columns(&self) -> Vec<String>
Returns the column names
sourcepub fn get_column(&self, name: &str) -> Result<Vec<i128>, &'static str>
pub fn get_column(&self, name: &str) -> Result<Vec<i128>, &'static str>
Returns the column names
sourcepub fn get_column_index(&self, name: &str) -> Result<i128, &'static str>
pub fn get_column_index(&self, name: &str) -> Result<i128, &'static str>
Returns the column names
sourcepub fn get_column_name(&self, index: i128) -> Result<String, &'static str>
pub fn get_column_name(&self, index: i128) -> Result<String, &'static str>
Returns the column names
sourcepub fn get_column_count(&self) -> i128
pub fn get_column_count(&self) -> i128
Returns the column names
sourcepub fn get_row_count(&self) -> usize
pub fn get_row_count(&self) -> usize
Returns the column names