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

后端 未结 19 1655
爱一瞬间的悲伤
爱一瞬间的悲伤 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条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 01:01

    You can use print df.describe().to_string() to force it to show the whole table. (You can use to_string() like this for any DataFrame. The result of describe is just a DataFrame itself.)

    The 8 is the number of rows in the DataFrame holding the "description" (because describe computes 8 statistics, min, max, mean, etc.).

提交回复
热议问题