pub struct CsvDataset<'a> {
pub names: Vec<ColName>,
pub values: Vec<Vec<CsvAny>>,
pub null_values: NullValues<'a>,
pub info: Vec<ColumnInfo>,
}Expand description
This is a form to represent the dataset which does not deep typization but can still be usefull, also info field holds some info about the types for each column
Fields§
§names: Vec<ColName>§values: Vec<Vec<CsvAny>>§null_values: NullValues<'a>§info: Vec<ColumnInfo>Implementations§
Source§impl<'a> CsvDataset<'a>
impl<'a> CsvDataset<'a>
Sourcepub fn push(&mut self, col_name: &str, col_values: Vec<CsvAny>)
pub fn push(&mut self, col_name: &str, col_values: Vec<CsvAny>)
Lenght of column values are not checked, so every column can have different lenght, be aware of row indexing
pub fn new<R: Read>(reader: Reader<R>, null_values: NullValues<'a>) -> Self
pub fn view_names_and_values(&self) -> ValueNamesView<'_>
pub fn split_view_and_info( &mut self, ) -> (ValueNamesView<'_>, &mut Vec<ColumnInfo>)
Sourcepub fn populate_column_infos(dataset: &mut Self)
pub fn populate_column_infos(dataset: &mut Self)
Analyze every cell in the csv file to extract every unique value
Trait Implementations§
Source§impl<'a> Debug for CsvDataset<'a>
impl<'a> Debug for CsvDataset<'a>
Source§impl<'a> Default for CsvDataset<'a>
impl<'a> Default for CsvDataset<'a>
Source§fn default() -> CsvDataset<'a>
fn default() -> CsvDataset<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for CsvDataset<'a>
impl<'a> RefUnwindSafe for CsvDataset<'a>
impl<'a> Send for CsvDataset<'a>
impl<'a> Sync for CsvDataset<'a>
impl<'a> Unpin for CsvDataset<'a>
impl<'a> UnwindSafe for CsvDataset<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more