@@ -170,7 +170,7 @@ def test_expand_frame_repr(self):
170
170
df_tall = DataFrame ('hello' , range (30 ), range (5 ))
171
171
172
172
with option_context ('mode.sim_interactive' , True ):
173
- with option_context ('display.max_columns' , 5 ,
173
+ with option_context ('display.max_columns' , 10 ,
174
174
'display.width' ,20 ,
175
175
'display.max_rows' , 20 ):
176
176
with option_context ('display.expand_frame_repr' , True ):
@@ -222,7 +222,7 @@ def mkframe(n):
222
222
self .assertTrue (has_info_repr (df6 ))
223
223
224
224
with option_context ('display.max_rows' , 20 ,
225
- 'display.max_columns' , 5 ):
225
+ 'display.max_columns' , 10 ):
226
226
# Out off max_columns boundary, but no extending
227
227
# since not exceeding width
228
228
self .assertFalse (has_expanded_repr (df6 ))
@@ -791,7 +791,7 @@ def test_wide_repr(self):
791
791
with option_context ('mode.sim_interactive' , True ):
792
792
col = lambda l , k : [tm .rands (k ) for _ in xrange (l )]
793
793
max_cols = get_option ('display.max_columns' )
794
- df = DataFrame ([col (max_cols + 1 , 25 ) for _ in range (10 )])
794
+ df = DataFrame ([col (max_cols - 1 , 25 ) for _ in range (10 )])
795
795
set_option ('display.expand_frame_repr' , False )
796
796
rep_str = repr (df )
797
797
set_option ('display.expand_frame_repr' , True )
@@ -815,7 +815,7 @@ def test_wide_repr_named(self):
815
815
with option_context ('mode.sim_interactive' , True ):
816
816
col = lambda l , k : [tm .rands (k ) for _ in xrange (l )]
817
817
max_cols = get_option ('display.max_columns' )
818
- df = DataFrame ([col (max_cols + 1 , 25 ) for _ in range (10 )])
818
+ df = DataFrame ([col (max_cols - 1 , 25 ) for _ in range (10 )])
819
819
df .index .name = 'DataFrame Index'
820
820
set_option ('display.expand_frame_repr' , False )
821
821
@@ -839,7 +839,7 @@ def test_wide_repr_multiindex(self):
839
839
midx = pandas .MultiIndex .from_arrays ([np .array (col (10 , 5 )),
840
840
np .array (col (10 , 5 ))])
841
841
max_cols = get_option ('display.max_columns' )
842
- df = DataFrame ([col (max_cols + 1 , 25 ) for _ in range (10 )],
842
+ df = DataFrame ([col (max_cols - 1 , 25 ) for _ in range (10 )],
843
843
index = midx )
844
844
df .index .names = ['Level 0' , 'Level 1' ]
845
845
set_option ('display.expand_frame_repr' , False )
@@ -863,9 +863,9 @@ def test_wide_repr_multiindex_cols(self):
863
863
col = lambda l , k : [tm .rands (k ) for _ in xrange (l )]
864
864
midx = pandas .MultiIndex .from_arrays ([np .array (col (10 , 5 )),
865
865
np .array (col (10 , 5 ))])
866
- mcols = pandas .MultiIndex .from_arrays ([np .array (col (max_cols + 1 , 3 )),
867
- np .array (col (max_cols + 1 , 3 ))])
868
- df = DataFrame ([col (max_cols + 1 , 25 ) for _ in range (10 )],
866
+ mcols = pandas .MultiIndex .from_arrays ([np .array (col (max_cols - 1 , 3 )),
867
+ np .array (col (max_cols - 1 , 3 ))])
868
+ df = DataFrame ([col (max_cols - 1 , 25 ) for _ in range (10 )],
869
869
index = midx , columns = mcols )
870
870
df .index .names = ['Level 0' , 'Level 1' ]
871
871
set_option ('display.expand_frame_repr' , False )
@@ -884,7 +884,7 @@ def test_wide_repr_unicode(self):
884
884
with option_context ('mode.sim_interactive' , True ):
885
885
col = lambda l , k : [tm .randu (k ) for _ in xrange (l )]
886
886
max_cols = get_option ('display.max_columns' )
887
- df = DataFrame ([col (max_cols + 1 , 25 ) for _ in range (10 )])
887
+ df = DataFrame ([col (max_cols - 1 , 25 ) for _ in range (10 )])
888
888
set_option ('display.expand_frame_repr' , False )
889
889
rep_str = repr (df )
890
890
set_option ('display.expand_frame_repr' , True )
0 commit comments