@@ -3832,23 +3832,41 @@ def test_set_ix_out_of_bounds_axis_1(self):
38323832 def test_iloc_empty_list_indexer_is_ok (self ):
38333833 from pandas .util .testing import makeCustomDataframe as mkdf
38343834 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 )
38383844
38393845 def test_loc_empty_list_indexer_is_ok (self ):
38403846 from pandas .util .testing import makeCustomDataframe as mkdf
38413847 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 )
38453857
38463858 def test_ix_empty_list_indexer_is_ok (self ):
38473859 from pandas .util .testing import makeCustomDataframe as mkdf
38483860 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 )
38523870
38533871 def test_deprecate_float_indexers (self ):
38543872
0 commit comments