1 chunkers=pd.read_csv('dd.csv',chunksize=10000)2 3 tot=pd.Series([])4 5 for piece in chunkers:6 7 tot=tot.add(piece['dfcol'].value_counts(),fill_value=0)#迭代计数8 9 tot=tot.order(ascending=False)
本文共 247 字,大约阅读时间需要 1 分钟。
1 chunkers=pd.read_csv('dd.csv',chunksize=10000)2 3 tot=pd.Series([])4 5 for piece in chunkers:6 7 tot=tot.add(piece['dfcol'].value_counts(),fill_value=0)#迭代计数8 9 tot=tot.order(ascending=False)
转载于:https://www.cnblogs.com/mahailuo/p/8317370.html