How do I expand the output display to see more columns of a pandas DataFrame?

后端 未结 19 1644
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 00:37

Is there a way to widen the display of output in either interactive or script-execution mode?

Specifically, I am using the describe() function on a pand

19条回答
  •  一生所求
    2020-11-22 01:08

    Try this:

    pd.set_option('display.expand_frame_repr', False)
    

    From the documentation:

    display.expand_frame_repr : boolean

    Whether to print out the full DataFrame repr for wide DataFrames across multiple lines, max_columns is still respected, but the output will wrap-around across multiple “pages” if it’s width exceeds display.width. [default: True] [currently: True]

    See: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.set_option.html

提交回复
热议问题