Last active
May 13, 2024 08:14
-
-
Save mols3131d/de772f360cebfdc979c811c237129946 to your computer and use it in GitHub Desktop.
Pandas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
select_dtypes() 함수의 include 매개변수에 올 수 있는 것들은 다음과 같습니다. | |
"number": 숫자형 데이터 유형 | |
"bool": 부울형 데이터 유형 | |
"object": 오브젝트형 데이터 유형 | |
"category": 카테고리형 데이터 유형 | |
"datetime64[ns]": 날짜/시간 데이터 유형 | |
"timedelta64[ns]": 시간 간격 데이터 유형 | |
"string": 문자열 데이터 유형 | |
"bytes": 바이트 데이터 유형 | |
"categorical": 카테고리형 데이터 유형(object 또는 category와 동일) | |
""" | |
df.describe() | |
df.describe(include=["object", "category"]) | |
df.describe(include="datetime") | |
numeric_columns = df.select_dtypes(include="number").columns.to_list() | |
categorical_columns = df.select_dtypes(include=["object", "category"]).columns.to_list() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment