python大 pandas 无法显示大数据帧的摘要 [英] python pandas unable to display summary of large dataframe
问题描述
提前感谢
对于.13,href =http://pandas-docs.github.io/pandas-docs-travis/whatsnew.html#dataframe-repr-changes =noreferrer>新功能。 p>
旧的方法是打印 df.info()
的结果。您可以通过 set_option('display.large_repr','info')
更改行为。如果您使用IPython,可以将其添加到IPython启动文件中。
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!
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.
这篇关于python大 pandas 无法显示大数据帧的摘要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!