pub struct SeriesEqualOptions {
pub check_dtypes: bool,
pub check_names: bool,
pub check_order: bool,
pub check_exact: bool,
pub rel_tol: f64,
pub abs_tol: f64,
pub categorical_as_str: bool,
}Expand description
Configuration options for comparing Series equality.
Controls the behavior of Series equality comparisons by specifying which aspects to check and the tolerance for floating point comparisons.
Fields§
§check_dtypes: boolWhether to check that the data types match.
check_names: boolWhether to check that the Series names match.
check_order: boolWhether to check that elements appear in the same order.
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 SeriesEqualOptions
impl SeriesEqualOptions
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.
Sourcepub fn with_check_names(self, value: bool) -> Self
pub fn with_check_names(self, value: bool) -> Self
Sets whether to check that Series names match.
Sourcepub fn with_check_order(self, value: bool) -> Self
pub fn with_check_order(self, value: bool) -> Self
Sets whether to check that elements appear in the same order.
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 SeriesEqualOptions
impl Default for SeriesEqualOptions
Source§fn default() -> Self
fn default() -> Self
Creates a new SeriesEqualOptions with default settings.
Default configuration:
- Checks data types, names, and order
- Uses exact equality comparisons
- 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 SeriesEqualOptions
impl RefUnwindSafe for SeriesEqualOptions
impl Send for SeriesEqualOptions
impl Sync for SeriesEqualOptions
impl Unpin for SeriesEqualOptions
impl UnwindSafe for SeriesEqualOptions
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