We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1f6056 commit f313841Copy full SHA for f313841
pandas/_testing.py
@@ -787,7 +787,11 @@ def _get_ilevel_values(index, level):
787
# skip exact index checking when `check_categorical` is False
788
if check_exact and check_categorical:
789
if not left.equals(right):
790
- diff = np.sum((left.values != right.values).astype(int)) * 100.0 / len(left)
+ diff = (
791
+ np.sum((np.not_equal(left.values, right.values)).astype(int))
792
+ * 100.0
793
+ / len(left)
794
+ )
795
msg = f"{obj} values are different ({np.round(diff, 5)} %)"
796
raise_assert_detail(obj, msg, left, right)
797
else:
0 commit comments