Enum lace_codebook::CodebookError
source · pub enum CodebookError {
Show 13 variants
Io(Error),
BlankColumn {
col_name: String,
},
UnableToInferColumnType {
col_name: String,
},
UnsupportedDataType {
col_name: String,
dtype: DataType,
},
CategoricalOverflow {
col_name: String,
},
ColumnMetadata(ColMetadataListError),
RowNames(RowNameListError),
Polars(PolarsError),
NoIdColumn,
NullValuesInIndex,
SingleValueColumn(String),
MultipleIdColumns,
Read(ReadError),
}Expand description
Errors that can arise when creating a codebook from a CSV file
Variants§
Io(Error)
BlankColumn
A column had no values in it.
UnableToInferColumnType
Could not infer the data type of a column
UnsupportedDataType
Dataset contains a Arrow datatype that cannot currently be converted to a column metadata
CategoricalOverflow
Too many distinct values for categorical column. A category is represented by a u8, so there can only be 256 distinct values.
ColumnMetadata(ColMetadataListError)
The column with name appears more than once
RowNames(RowNameListError)
The column with name appears more than once
Polars(PolarsError)
Polars error
NoIdColumn
The user did not provide an index/ID column
NullValuesInIndex
There are null values in the index/ID column
SingleValueColumn(String)
There the column contains only a single unique value, which can cause zero-variance issues which in turn cause other numerical issues.
MultipleIdColumns
There is more than one column named some form of ID. For example,
there is a column named ID and id.
Read(ReadError)
Problem reading data into a DataFrame
Trait Implementations§
source§impl Debug for CodebookError
impl Debug for CodebookError
source§impl Display for CodebookError
impl Display for CodebookError
source§impl Error for CodebookError
impl Error for CodebookError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<ColMetadataListError> for CodebookError
impl From<ColMetadataListError> for CodebookError
source§fn from(source: ColMetadataListError) -> Self
fn from(source: ColMetadataListError) -> Self
source§impl From<Error> for CodebookError
impl From<Error> for CodebookError
source§impl From<PolarsError> for CodebookError
impl From<PolarsError> for CodebookError
source§impl From<ReadError> for CodebookError
impl From<ReadError> for CodebookError
source§impl From<RowNameListError> for CodebookError
impl From<RowNameListError> for CodebookError
source§fn from(source: RowNameListError) -> Self
fn from(source: RowNameListError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for CodebookError
impl Send for CodebookError
impl Sync for CodebookError
impl Unpin for CodebookError
impl !UnwindSafe for CodebookError
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
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.