We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5f14dc commit af73848Copy full SHA for af73848
pandas/core/dtypes/dtypes.py
@@ -2056,6 +2056,15 @@ def __init__(self, pyarrow_dtype: pa.DataType) -> None:
2056
def __repr__(self) -> str:
2057
return self.name
2058
2059
+ def __hash__(self) -> int:
2060
+ # make myself hashable
2061
+ return hash(str(self))
2062
+
2063
+ def __eq__(self, other: Any) -> bool:
2064
+ if not isinstance(other, type(self)):
2065
+ return super().__eq__(other)
2066
+ return self.pyarrow_dtype == other.pyarrow_dtype
2067
2068
@property
2069
def type(self):
2070
"""
0 commit comments