반응형
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
- Apache
- hive
- Excel
- 파이썬
- GIT
- c#
- list
- dataframe
- math
- django
- Redshift
- Tkinter
- gas
- Mac
- SQL
- Github
- matplotlib
- PySpark
- Kotlin
- Google Spreadsheet
- Java
- string
- Google Excel
- PostgreSQL
- Python
- array
- google apps script
- numpy
- PANDAS
Archives
- Today
- Total
목록tail (1)
달나라 노트
Python Pandas : head, tail (DataFrame에서 상위 행 또는 하위 행만 추출하기)
DataFrame의 행이 많아서 일부 행만 확인하고 싶을 때 또는 어떠한 이유로 처음 또는 끝의 일부 행만 추출해야할 때 사용할 수 있는 method가 있습니다. Syntax DataFrame.head() # 상위 5개 행 반환 DataFrame.tail() # 하위 5개 행 반환 DataFrame.head(n) # 상위 n개 행 반환 DataFrame.tail(n) # 하위 n개 행 반환 사용법은 위와 같습니다. DataFrame에 적용할 수 있으며, head는 기본적으로 DataFrame의 가장 위쪽 5개 행을 return해주고 tail은 기본적으로 DataFrame의 가장 아래쪽 5개 행을 return해줍니다. head, tail의 parameter로 어떤 숫자를 넣게 되면 해당 숫자만큼의 행만큼 ..
Python/Python Pandas
2021. 8. 3. 19:00
