반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
29 | 30 |
Tags
- 파이썬
- PostgreSQL
- Apache
- django
- list
- google apps script
- gas
- PySpark
- Github
- dataframe
- string
- Python
- Google Spreadsheet
- Tkinter
- Excel
- SQL
- array
- c#
- matplotlib
- math
- Google Excel
- numpy
- hive
- Redshift
- Java
- PANDAS
- Mac
- GIT
- Kotlin
Archives
- Today
- Total
목록GROUPBY (5)
달나라 노트
Python Pandas : DataFrame.groupby
DataFrame.groupby groupby는 특정 컬럼에 존재하는 값들에 대해서 동일한 값을 가진 행끼리 그룹화하고 그룹화된 행들에 어떤 연산(합, 평균, 최대, 최소 등)을 해주는 기능을 가집니다. 먼저 test용 DataFrame을 생성합니다. import pandas as pd dict_item = { 'date': [ 20200101, 20200102, 20200103, 20200101, 20200102, 20200103, 20200101, 20200102, 20200103, 20200101, 20200102, 20200103, 20200104 ], 'item_id': [ 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4 ], 'item_name': [ 'a', 'a', 'a..
Python/Python Pandas
2020. 11. 2. 18:23