Skip to content

Commit ffa7ead

Browse files
fix more tests
1 parent cb7410f commit ffa7ead

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pandas/core/indexes/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5453,9 +5453,10 @@ def equals(self, other: Any) -> bool:
54535453

54545454
if (
54555455
isinstance(self.dtype, StringDtype)
5456-
and self.dtype.storage == "pyarrow_numpy"
5456+
and self.dtype.na_value is np.nan
54575457
and other.dtype != self.dtype
54585458
):
5459+
# TODO(infer_string) can we avoid this special case?
54595460
# special case for object behavior
54605461
return other.equals(self.astype(object))
54615462

pandas/tests/strings/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
def _convert_na_value(ser, expected):
99
if ser.dtype != object:
10-
if ser.dtype.storage == "pyarrow_numpy":
10+
if ser.dtype.na_value is np.nan:
1111
expected = expected.fillna(np.nan)
1212
else:
1313
# GH#18463

0 commit comments

Comments
 (0)