File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -397,11 +397,13 @@ def test_getitem_setitem_ix_negative_integers(self):
397
397
398
398
df = DataFrame (np .random .randn (8 , 4 ))
399
399
# ix does label-based indexing when having an integer index
400
- with pytest .raises (KeyError ):
401
- df .ix [[- 1 ]]
400
+ with catch_warnings (record = True ):
401
+ with pytest .raises (KeyError ):
402
+ df .ix [[- 1 ]]
402
403
403
- with pytest .raises (KeyError ):
404
- df .ix [:, [- 1 ]]
404
+ with catch_warnings (record = True ):
405
+ with pytest .raises (KeyError ):
406
+ df .ix [:, [- 1 ]]
405
407
406
408
# #1942
407
409
a = DataFrame (randn (20 , 2 ), index = [chr (x + 65 ) for x in range (20 )])
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ def test_dups_fancy_indexing(self):
197
197
# List containing only missing label
198
198
dfnu = DataFrame (np .random .randn (5 , 3 ), index = list ('AABCD' ))
199
199
with pytest .raises (KeyError ):
200
- dfnu .ix [['E' ]]
200
+ dfnu .loc [['E' ]]
201
201
202
202
# ToDo: check_index_type can be True after GH 11497
203
203
You can’t perform that action at this time.
0 commit comments