equal
Check the row-wise equality of all input columns.
For each row, checks whether all values in that row are equal. The result is a boolean column
indicating equality for each row as true
or false
.
Note that if the types of input columns are not compatible, the result will be False
for all
rows. Compatibility here means that input columns must be
- all numeric or boolean (the latter being interpreted as 0.0/1.0), OR
- all string-like (categorical or text), OR
- all list-like
By default, missing values (NaNs) in the same location are considered equal in this step. However,
check the parameter keep_nans
below to control how the presence of NaNs affects the result.
Also, when performing numeric comparison, the parameters rel_tol
and abs_tol
can be used to check
for approximate equality. The desired tolerance (precision) can then be expressed either as a
proportion of a reference value; and/or as an absolute maximum difference). More specifically,
the equation used to check for numeric equality between values a
and b
is:
absolute(a - b) <= (rel_tol * absolute(b) + abs_tol)
.
Also see the parameter descriptions below, or the corresponding numpy documentation for further details.
Was this page helpful?