We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb7410f commit ffa7eadCopy full SHA for ffa7ead
pandas/core/indexes/base.py
@@ -5453,9 +5453,10 @@ def equals(self, other: Any) -> bool:
5453
5454
if (
5455
isinstance(self.dtype, StringDtype)
5456
- and self.dtype.storage == "pyarrow_numpy"
+ and self.dtype.na_value is np.nan
5457
and other.dtype != self.dtype
5458
):
5459
+ # TODO(infer_string) can we avoid this special case?
5460
# special case for object behavior
5461
return other.equals(self.astype(object))
5462
pandas/tests/strings/__init__.py
@@ -7,7 +7,7 @@
7
8
def _convert_na_value(ser, expected):
9
if ser.dtype != object:
10
- if ser.dtype.storage == "pyarrow_numpy":
+ if ser.dtype.na_value is np.nan:
11
expected = expected.fillna(np.nan)
12
else:
13
# GH#18463
0 commit comments