We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d44804 commit a3a1cccCopy full SHA for a3a1ccc
pandas/tests/indexing/test_indexing.py
@@ -192,15 +192,9 @@ def test_dups_fancy_indexing(self):
192
result = df.loc[rows]
193
tm.assert_frame_equal(result, expected)
194
195
- # inconsistent returns for unique/duplicate indices when values are
196
- # missing
197
- df = DataFrame(np.random.randn(4, 3), index=list('ABCD'))
198
- expected = df.reindex(['E'])
199
-
200
dfnu = DataFrame(np.random.randn(5, 3), index=list('AABCD'))
201
- with catch_warnings(record=True):
202
- result = dfnu.ix[['E']]
203
- tm.assert_frame_equal(result, expected)
+ with pytest.raises(KeyError):
+ dfnu.ix[['E']]
204
205
# ToDo: check_index_type can be True after GH 11497
206
0 commit comments