코딩/파이썬(python)
from collections import Counter , .most_common()
코딩 코딩 코오딩
2021. 5. 2. 14:26
www.daleseo.com/python-collections-counter/
[파이썬] collections 모듈의 Counter 클래스 사용법
Engineering Blog by Dale Seo
www.daleseo.com
Counter : 문자열에 있는 문자의 수를 추출해준다.
.most_common() : 데이터의 개수가 많은 순으로 정렬된 배열을 리턴해준다.
from collections import Counter 을 같이 써주아야한다.
반응형