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)
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)