본문 바로가기

Stack Building

검색하기
Stack Building
프로필사진 S00ahKim

  • 분류 전체보기 (97)
    • 머신러닝 (23)
    • 딥러닝 (7)
    • NLP (3)
    • DB (6)
    • OS (0)
    • Python (12)
    • R (6)
    • 웹 (19)
    • 앱 (9)
    • 스크랩 (1)
    • 세미나 (6)
    • etc (5)
Guestbook
Notice
Recent Posts
Recent Comments
Link
Tags
  • 투빅스
  • 신경망
  • 선형회귀
  • 챗봇
  • 의사결정나무
  • 정규표현식
  • 오류
  • MOOC
  • 분류
  • 안드로이드스튜디오
  • flask
  • 머신러닝
  • React
  • 클러스터링
  • 안드로이드
  • Android
  • tensorflow
  • AWS
  • javascript
  • 크롤링
  • 비지도학습
  • 앙상블
  • 딥러닝
  • python
  • 텐서플로우
  • 인공지능
  • Redux
  • r
  • 활성함수
  • 데이터베이스
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Collections (1)

Stack Building

collections 모듈

컨테이너에 동일한 값의 자료가 몇 개인지 파악하는 데에 사용. 가장 수가 큰 것부터 출력한다. 1. 리스트 import collections list = ['a', 'b', 'b', 'c'] print(collections.Counter(list)) >>Counter({'b':2, 'a':1, 'c':1}) 2. 딕셔너리 import collections print(collections.Counter({'가': 3, '나': 2, '다': 4})) >>Counter({'다': 4, '가': 3, '나': 2}) 3. 값=개수 import collections c = collections.Counter(a=2, b=3, c=2) print(collections.Counter(c)) print(sorted(..

Python 2019. 7. 13. 23:22
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바