File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 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):
397397
398398 df = DataFrame (np .random .randn (8 , 4 ))
399399 # 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 ]]
402403
403- with pytest .raises (KeyError ):
404- df .ix [:, [- 1 ]]
404+ with catch_warnings (record = True ):
405+ with pytest .raises (KeyError ):
406+ df .ix [:, [- 1 ]]
405407
406408 # #1942
407409 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):
197197 # List containing only missing label
198198 dfnu = DataFrame (np .random .randn (5 , 3 ), index = list ('AABCD' ))
199199 with pytest .raises (KeyError ):
200- dfnu .ix [['E' ]]
200+ dfnu .loc [['E' ]]
201201
202202 # ToDo: check_index_type can be True after GH 11497
203203
You can’t perform that action at this time.
0 commit comments