@@ -3832,23 +3832,41 @@ def test_set_ix_out_of_bounds_axis_1(self):
3832
3832
def test_iloc_empty_list_indexer_is_ok (self ):
3833
3833
from pandas .util .testing import makeCustomDataframe as mkdf
3834
3834
df = mkdf (5 , 2 )
3835
- assert_frame_equal (df .iloc [:,[]], df .iloc [:, :0 ]) # vertical empty
3836
- assert_frame_equal (df .iloc [[],:], df .iloc [:0 , :]) # horizontal empty
3837
- assert_frame_equal (df .iloc [[]], df .iloc [:0 , :]) # horizontal empty
3835
+ # vertical empty
3836
+ assert_frame_equal (df .iloc [:, []], df .iloc [:, :0 ],
3837
+ check_index_type = True , check_column_type = True )
3838
+ # horizontal empty
3839
+ assert_frame_equal (df .iloc [[], :], df .iloc [:0 , :],
3840
+ check_index_type = True , check_column_type = True )
3841
+ # horizontal empty
3842
+ assert_frame_equal (df .iloc [[]], df .iloc [:0 , :],
3843
+ check_index_type = True , check_column_type = True )
3838
3844
3839
3845
def test_loc_empty_list_indexer_is_ok (self ):
3840
3846
from pandas .util .testing import makeCustomDataframe as mkdf
3841
3847
df = mkdf (5 , 2 )
3842
- assert_frame_equal (df .loc [:,[]], df .iloc [:, :0 ]) # vertical empty
3843
- assert_frame_equal (df .loc [[],:], df .iloc [:0 , :]) # horizontal empty
3844
- assert_frame_equal (df .loc [[]], df .iloc [:0 , :]) # horizontal empty
3848
+ # vertical empty
3849
+ assert_frame_equal (df .loc [:, []], df .iloc [:, :0 ],
3850
+ check_index_type = True , check_column_type = True )
3851
+ # horizontal empty
3852
+ assert_frame_equal (df .loc [[], :], df .iloc [:0 , :],
3853
+ check_index_type = True , check_column_type = True )
3854
+ # horizontal empty
3855
+ assert_frame_equal (df .loc [[]], df .iloc [:0 , :],
3856
+ check_index_type = True , check_column_type = True )
3845
3857
3846
3858
def test_ix_empty_list_indexer_is_ok (self ):
3847
3859
from pandas .util .testing import makeCustomDataframe as mkdf
3848
3860
df = mkdf (5 , 2 )
3849
- assert_frame_equal (df .ix [:,[]], df .iloc [:, :0 ]) # vertical empty
3850
- assert_frame_equal (df .ix [[],:], df .iloc [:0 , :]) # horizontal empty
3851
- assert_frame_equal (df .ix [[]], df .iloc [:0 , :]) # horizontal empty
3861
+ # vertical empty
3862
+ assert_frame_equal (df .ix [:, []], df .iloc [:, :0 ],
3863
+ check_index_type = True , check_column_type = True )
3864
+ # horizontal empty
3865
+ assert_frame_equal (df .ix [[], :], df .iloc [:0 , :],
3866
+ check_index_type = True , check_column_type = True )
3867
+ # horizontal empty
3868
+ assert_frame_equal (df .ix [[]], df .iloc [:0 , :],
3869
+ check_index_type = True , check_column_type = True )
3852
3870
3853
3871
def test_deprecate_float_indexers (self ):
3854
3872
0 commit comments