반응형
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
- hive
- django
- SQL
- google apps script
- gas
- Google Spreadsheet
- PostgreSQL
- Github
- Python
- Redshift
- array
- PANDAS
- Apache
- 파이썬
- Mac
- list
- string
- Kotlin
- Excel
- GIT
- Java
- math
- numpy
- Tkinter
- dataframe
- Google Excel
- PySpark
- c#
- matplotlib
Archives
- Today
- Total
목록sort_values (1)
달나라 노트
Python Pandas : sort_values (DataFrame의 정렬, DataFrame 정렬하기)
Pandas에선 DataFrame에 존재하는 Data를 정렬하기 위한 sort_values라는 함수를 제공합니다. import pandas as pd dict_test = { 'col1': [3, 1, 2, 3, 2, 1], 'col2': ['b', 'a', 'd', 'e', 'y', 'z'] } df_test = pd.DataFrame(dict_test) print(df_test) print(type(df_test)) - Output col1 col2 0 3 b 1 1 a 2 2 d 3 3 e 4 2 y 5 1 z 먼저 테스트용 DataFrame을 만듭시다. df_test_sorted = df_test.sort_values(by=['col1'], ascending=True) print(df_test_s..
Python/Python Pandas
2021. 1. 6. 15:49