We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6d08f1e + 0c6b794 commit 24c5b78Copy full SHA for 24c5b78
pandas/core/frame.py
@@ -703,10 +703,13 @@ def __unicode__(self):
703
self.to_string(buf=buf)
704
else:
705
width, _ = fmt.get_console_size()
706
- max_rows = get_option("display.max_rows")
707
- if (get_option("display.expand_frame_repr")
708
- and fits_vertical):
709
- # and len(self.columns) < max_rows)
+ max_columns = get_option("display.max_columns")
+ expand_repr = get_option("display.expand_frame_repr")
+ # within max_cols and max_rows, but cols exceed width
+ # of terminal, then use expand_repr
710
+ if (fits_vertical and
711
+ expand_repr and
712
+ len(self.columns) <= max_columns):
713
self.to_string(buf=buf, line_width=width)
714
715
max_info_rows = get_option('display.max_info_rows')
0 commit comments