python pandas unable to display summary of large dataframe

半世苍凉 提交于 2019-12-11 01:58:05

问题


I recently upgraded to pandas version 0.13 and am experiencing this problem where no matter how big my dataframe is ( the biggest one has 25 columns and 158430 rows), pandas prints out the entire dataframe (well not the entire thing, just a few rows in each column but it's still messy!) instead of printing out the summary table which is much cleaner in the case of such large data frames. I was just wondering whether anyone else is having this problem or has had this problem in the past and knows how to fix it.

Thanks in advance!


回答1:


Here's the change in the what's new for .13.

The old way was to print the result of df.info(). You can change the behavior to always do that with set_option('display.large_repr', 'info'). You can add that to your IPython startup file if you're using IPython.



来源:https://stackoverflow.com/questions/21737988/python-pandas-unable-to-display-summary-of-large-dataframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!