Prabhath Kota
PySpark, BigData, SQL, Hive, AWS, Python, Unix/Linux, Shortcuts, Examples, Scripts, Perl
May 4, 2020
python collections Counter
from collections import Counter
listA = [40, 10, 20, 30, 10]
c = Counter(listA)
print(c)
#Counter({10: 2, 40: 1, 20: 1, 30: 1})
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment