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

后端 未结 19 1654
爱一瞬间的悲伤
爱一瞬间的悲伤 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 00:53

    You can simply do the following steps,

    • You can change the options for pandas max_columns feature as follows

      import pandas as pd
      pd.options.display.max_columns = 10
      

      (this allows 10 columns to display, you can change this as you need)

    • Like that you can change the number of rows as you need to display as follows (if you need to change maximum rows as well)

      pd.options.display.max_rows = 999
      

      (this allows to print 999 rows at a time)

    Please kindly refer the doc to change different options/settings for pandas

提交回复
热议问题