일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- discrete_scatter
- web
- inorder
- web 용어
- bccard
- 데이터전문기관
- pycharm
- vscode
- 재귀함수
- C언어
- 머신러닝
- classification
- java역사
- CES 2O21 참가
- paragraph
- html
- 결합전문기관
- Keras
- 웹 용어
- mglearn
- cudnn
- web 개발
- broscoding
- CES 2O21 참여
- web 사진
- 자료구조
- postorder
- 대이터
- tensorflow
- KNeighborsClassifier
- Today
- Total
bro's coding
pandas. count 본문
s=data[['노선명','역ID']].drop_duplicates().노선명.value_counts()
line_code['역수']=line_code.노선명.map(s)
line_code
[[day, data[data.사용일자==day].shape[0]] for day in range(20190501,20190532)]
[[20190501, 593], [20190502, 593], [20190503, 593], [20190504, 591], [20190505, 591], [20190506, 592], [20190507, 590], [20190508, 592], [20190509, 591], [20190510, 591], [20190511, 592], [20190512, 590], [20190513, 592], [20190514, 592], [20190515, 592], [20190516, 593], [20190517, 593], [20190518, 591], [20190519, 591], [20190520, 592], [20190521, 592], [20190522, 590], [20190523, 593], [20190524, 592], [20190525, 0], [20190526, 592], [20190527, 590], [20190528, 591], [20190529, 590], [20190530, 591], [20190531, 590]]
{day: data[data.사용일자==day].shape[0] for day in range(20190501,20190532)}
{20190501: 593, 20190502: 593, 20190503: 593, 20190504: 591, 20190505: 591, 20190506: 592, 20190507: 590, 20190508: 592, 20190509: 591, 20190510: 591, 20190511: 592, 20190512: 590, 20190513: 592, 20190514: 592, 20190515: 592, 20190516: 593, 20190517: 593, 20190518: 591, 20190519: 591, 20190520: 592, 20190521: 592, 20190522: 590, 20190523: 593, 20190524: 592, 20190525: 0, 20190526: 592, 20190527: 590, 20190528: 591, 20190529: 590, 20190530: 591, 20190531: 590}
'[IT] > python.pandas' 카테고리의 다른 글
pandas.unstack(벡터로 펼치기(인덱스 두개)) (0) | 2020.04.06 |
---|---|
pandas.groupby (0) | 2020.04.06 |
pandas. 항목 추가 (0) | 2020.04.06 |
pandas.drop_duplicates (0) | 2020.04.06 |
pandas.코드화 (0) | 2020.04.06 |
pandas.pivot table (0) | 2020.04.06 |
pandas.value_count (0) | 2020.04.06 |
pandas.카테고리 알기 (0) | 2020.04.06 |