File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -604,6 +604,8 @@ def _need_info_repr_(self):
604
604
Check if it is needed to use info/summary view to represent a
605
605
particular DataFrame.
606
606
"""
607
+ if not get_option ("display.expand_frame_repr" ):
608
+ return True
607
609
608
610
if com .in_qtconsole ():
609
611
terminal_width , terminal_height = 100 , 100
@@ -612,28 +614,25 @@ def _need_info_repr_(self):
612
614
max_rows = (terminal_height if get_option ("display.max_rows" ) == 0
613
615
else get_option ("display.max_rows" ))
614
616
max_columns = get_option ("display.max_columns" )
615
- expand_repr = get_option ("display.expand_frame_repr" )
616
617
617
618
if max_columns > 0 :
618
619
if (len (self .index ) <= max_rows and
619
- (len (self .columns ) <= max_columns and expand_repr )):
620
+ (len (self .columns ) <= max_columns )):
620
621
return False
621
622
else :
622
623
return True
623
624
else :
624
625
# save us
625
626
if (len (self .index ) > max_rows or
626
627
(com .in_interactive_session () and
627
- len (self .columns ) > terminal_width // 2 and
628
- not expand_repr )):
628
+ len (self .columns ) > terminal_width // 2 )):
629
629
return True
630
630
else :
631
631
buf = StringIO ()
632
632
self .to_string (buf = buf )
633
633
value = buf .getvalue ()
634
634
if (max ([len (l ) for l in value .split ('\n ' )]) > terminal_width
635
- and com .in_interactive_session ()
636
- and not expand_repr ):
635
+ and com .in_interactive_session ()):
637
636
return True
638
637
else :
639
638
return False
You can’t perform that action at this time.
0 commit comments