반응형
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
- dataframe
- string
- Python
- GIT
- Kotlin
- Google Spreadsheet
- matplotlib
- hive
- c#
- Presto
- Redshift
- PostgreSQL
- django
- list
- Google Excel
- 파이썬
- PANDAS
- Tkinter
- gas
- Apache
- array
- PySpark
- Github
- Java
- math
- numpy
- SQL
- google apps script
- Excel
Archives
- Today
- Total
목록dtypes (1)
달나라 노트
Python Pandas : dtypes (column의 data type 출력, column data type 확인)
Dataframe에 있는 column들의 data type을 확인하는 방법은 여러 가지가 있습니다만이번에는 내가 원하는 컬럼의 data type만을 확인하고 싶을 때에는 dtypes를 사용하면 됩니다. SyntaxdataFrame.dtypes dtypes는 위처럼 그냥 dataframe에 적용만 해주면 됩니다. 예시를 봐봅시다. import pandas as pd# 1 dataframe 생성df = pd.DataFrame({ 'col1': [1, 2, 3, 4, 5], 'col2': ['a', 'b', 'c', 'd', 'e'], 'col3': [1.0, 2.5, 3.9, 0.4, 2.0]})# 2 dataframe 출력print(df)# 3 col2, col3의 data type ..
Python/Python Pandas
2025. 9. 28. 03:32