We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4c19e7 commit 28b7714Copy full SHA for 28b7714
pandas/core/dtypes/dtypes.py
@@ -406,6 +406,12 @@ def __eq__(self, other: Any) -> bool:
406
# but same order is not necessary. There is no distinction between
407
# ordered=False and ordered=None: CDT(., False) and CDT(., None)
408
# will be equal if they have the same categories.
409
+ if (
410
+ self.categories.dtype == other.categories.dtype
411
+ and self.categories.equals(other.categories)
412
+ ):
413
+ # Check and see if they happen to be identical categories
414
+ return True
415
return hash(self) == hash(other)
416
417
def __repr__(self):
0 commit comments