今天在对文件数据进行统计的时候,使用pandas中的groupby()函数,在写出文件的时候,因为文件的列数比较多,导致写出的文件保留了省略号,并且没有出现神略的列数据,找到了一个解决方法.记录一下.

解决的方法
暂时可行的解决方案:
设置最大显示的行数:
pd.set_option('display.max_columns',1000)
pd.set_option('display.max_columns',None)
设置显示的宽度:
pd.set_option('display.width',1000)
设置显示的最大列宽,可以用于规范数据输出打印:
pd.set_option('display.max_colwidth',1000)

网友评论