반응형
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 | 31 |
Tags
- PANDAS
- math
- 파이썬
- string
- PySpark
- Google Spreadsheet
- array
- c#
- Python
- Redshift
- google apps script
- Excel
- list
- Google Excel
- Apache
- Tkinter
- gas
- Github
- matplotlib
- numpy
- Kotlin
- SQL
- django
- GIT
- dataframe
- Mac
- hive
- Java
- PostgreSQL
Archives
- Today
- Total
목록Shift (1)
달나라 노트
Python Pandas : shift (행 위치 옮기기)
Pandas의 shift method는 DataFrame이나 Series에 적용해서 행의 위치를 일정 칸수씩 이동시킵니다. 바로 예시를 통해 알아봅시다. import pandas as pd dict_test = { 'col1': [ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4 ], 'col2': [ 'a', 'a', 'a', 'b', 'b', 'b', 'a', 'a', 'b', 'b', 'a', 'a', 'b', 'a', 'b', 'b' ], 'col3': [ 1000, 1100, 1200, 1300, 1050, 1100, 2100, 2050, 2000, 2200, 3000, 3100, 3200, 4200, 4100, 4150 ], 'col4': [ 1, 2, 3,..
Python/Python Pandas
2021. 9. 28. 23:08