pub fn from_rows(columns: &[&str], rows: &[Vec<f64>]) -> Self {
        assert_eq!(columns.len(), rows[0].len());
        DataFrame {
            columns: columns.iter().map(|s| s.to_string()).collect(),
            ncols: rows[0].len(),
            nrows: rows.len(),
            data: rows.iter().flatten().copied().collect(),
        }
    }
/// Creates a data frame from a vector of rows.
Creates a data frame from a vector of rows.
Creates a data frame from a vector of rows .
pub fn from_rows(columns: &[&str], rows: &[Vec<f64>]) -> Self {
        assert_eq!(columns.len(), rows[0].len());
        DataFrame {
            columns: columns.iter().map(|s| s.to_string()).collect(),
            ncols: rows[0].len(),
            nrows: rows.len(),
            data: rows.iter().flatten().copied().collect(),
        }
    }
pub fn from_rows ( columns : & [ & str ] , rows : & [ Vec < f64 > ] ) -> Self { assert_eq ! ( columns len ( ) rows [ 0 ] len ( ) ) ; DataFrame { columns : columns . iter ( ) . map ( | s | s . to_string ( ) ) . collect ( ) , ncols : rows [ 0 ] . len ( ) , nrows : rows . len ( ) , data : rows . iter ( ) . flatten ( ) . copied ( ) . collect ( ) , } }
Creates a data frame from a vector of rows.
Creates a data frame from a vector of rows .
columns
&[&str]
rows
&[Vec<f64>]
columns
&[&str]
rows
&[Vec<f64>]