import pandas as pd
chunk_size = 1000
counts = pd.Series(dtype=int)
for chunk in pd.read_csv('1.csv', chunksize=chunk_size):
counts = counts.add(chunk['?云'].value_counts(), fill_value=0)
counts.to_csv('罗马地方1.csv', index_label='False',encoding='utf-8_sig')
使用者只需要更改输入的文件名称和字段名称。
文件名称:
1.csv
字段名称:
?云