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 bdfd2d3 commit cfb2f09Copy full SHA for cfb2f09
pandas/tests/indexes/object/test_indexing.py
@@ -65,11 +65,13 @@ def test_get_indexer_with_NA_values(
65
66
@td.skip_if_no("pyarrow")
67
def test_get_indexer_infer_string_missing_values(self):
68
- # GH#55834
+ # ensure the passed list is not cast to string but to object so that
69
+ # the None value is matched in the index
70
+ # https://github.com/pandas-dev/pandas/issues/55834
71
idx = Index(["a", "b", None], dtype="object")
72
result = idx.get_indexer([None, "x"])
- expected = np.array([2, -1])
- tm.assert_numpy_array_equal(result, expected, check_dtype=False)
73
+ expected = np.array([2, -1], dtype=np.intp)
74
+ tm.assert_numpy_array_equal(result, expected)
75
76
77
class TestGetIndexerNonUnique:
0 commit comments