Struct rusty_data::datatable::DataTable [] [src]

pub struct DataTable {
    pub data_cols: Vec<DataColumn>,
}

A data table consisting of varying column types and headers.

Fields

data_cols: Vec<DataColumn>

Vector of DataColumns.

Methods

impl DataTable
[src]

fn empty() -> DataTable

Constructs an empty DataTable

fn cols(&self) -> usize

The number of columns in the DataTable.

fn rows(&self) -> usize

The number of rows in the DataTable.

fn shrink_to_fit(&mut self)

Shrinks the table and it's underlying columns.

fn into_consistent_data<T: FromStr>(self) -> Result<Vec<T>, DataError>

Consumes self and attempts to convert the DataTable into a single Vec.

Uses column major ordering.

Failures

  • DataCastError : Returned when the data cannot be cast into the requested type.

fn consistent_data<T: FromStr>(&self) -> Option<Vec<T>>

Attempts to convert the DataTable into a single Vec.

Uses column major ordering. Returns an Option.