pub struct DataFrameEqualOptions {
pub check_row_order: bool,
pub check_column_order: bool,
pub check_dtypes: bool,
pub check_exact: bool,
pub rel_tol: f64,
pub abs_tol: f64,
pub categorical_as_str: bool,
}Expand description
Configuration options for comparing DataFrame equality.
Controls the behavior of DataFrame equality comparisons by specifying which aspects to check and the tolerance for floating point comparisons.
Fields§
§check_row_order: boolWhether to check that rows appear in the same order.
check_column_order: boolWhether to check that columns appear in the same order.
check_dtypes: boolWhether to check that the data types match for corresponding columns.
check_exact: boolWhether to check for exact equality (true) or approximate equality (false) for floating point values.
rel_tol: f64Relative tolerance for approximate equality of floating point values.
abs_tol: f64Absolute tolerance for approximate equality of floating point values.
categorical_as_str: boolWhether to compare categorical values as strings.
Implementations§
Source§impl DataFrameEqualOptions
impl DataFrameEqualOptions
Sourcepub fn with_check_row_order(self, value: bool) -> Self
pub fn with_check_row_order(self, value: bool) -> Self
Sets whether to check that rows appear in the same order.
Sourcepub fn with_check_column_order(self, value: bool) -> Self
pub fn with_check_column_order(self, value: bool) -> Self
Sets whether to check that columns appear in the same order.
Sourcepub fn with_check_dtypes(self, value: bool) -> Self
pub fn with_check_dtypes(self, value: bool) -> Self
Sets whether to check that data types match for corresponding columns.
Sourcepub fn with_check_exact(self, value: bool) -> Self
pub fn with_check_exact(self, value: bool) -> Self
Sets whether to check for exact equality (true) or approximate equality (false) for floating point values.
Sourcepub fn with_rel_tol(self, value: f64) -> Self
pub fn with_rel_tol(self, value: f64) -> Self
Sets the relative tolerance for approximate equality of floating point values.
Sourcepub fn with_abs_tol(self, value: f64) -> Self
pub fn with_abs_tol(self, value: f64) -> Self
Sets the absolute tolerance for approximate equality of floating point values.
Sourcepub fn with_categorical_as_str(self, value: bool) -> Self
pub fn with_categorical_as_str(self, value: bool) -> Self
Sets whether to compare categorical values as strings.
Trait Implementations§
Source§impl Default for DataFrameEqualOptions
impl Default for DataFrameEqualOptions
Source§fn default() -> Self
fn default() -> Self
Creates a new DataFrameEqualOptions with default settings.
Default configuration:
- Checks row order, column order, and data types
- Uses approximate equality comparisons for floating point values
- Sets relative tolerance to 1e-5 and absolute tolerance to 1e-8 for floating point comparisons
- Does not convert categorical values to strings for comparison
Auto Trait Implementations§
impl Freeze for DataFrameEqualOptions
impl RefUnwindSafe for DataFrameEqualOptions
impl Send for DataFrameEqualOptions
impl Sync for DataFrameEqualOptions
impl Unpin for DataFrameEqualOptions
impl UnwindSafe for DataFrameEqualOptions
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
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>
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>
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