列表中重复元素统计( python统计列表中元素出现的个数)

将需要统计的数据放入1.txt文件中,

import pandas as pd

l = pd.read_csv('1.txt')

l1 = list(l['列名'])

from collections import Counter

Counter(l1)
 

猜你喜欢

转载自blog.csdn.net/weixin_41470864/article/details/88875762