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
- Python
- 카카오
- oracle
- Oracel
- 파이썬
- 빅데이터 분석 기사
- level 2
- matplotlib
- sklearn
- 알고리즘
- 머신러닝
- 오라클
- seaborn
- Numpy
- 코딩테스트
- SQL
- level 1
- 실습
- Kaggle
- python3
- 데이터 분석
- 빅분기
- 튜닝
- R
- 실기
- pandas
- 프로그래머스
Archives
- Today
- Total
라일락 꽃이 피는 날
[Pandas] select_dtypes 본문
728x90
데이터 타입별 column 선택 (select_dtypes)
1. 문자열이 있는 column만 선택

2. 문자열이 없는 column만 선택

select_dtypes 을 이용하여 선택한 데이터 타입별 컬럼들을 변수에 담아서 활용할 수 있다.
num_cols = df.select_dtypes(exclude='object').columns
obj_cols = df.select_dtypes(include='object').columns

728x90
'데이터 분석 > Python' 카테고리의 다른 글
| [Pandas] Plot 그래프 (0) | 2021.04.27 |
|---|---|
| [Pandas] 원핫인코딩 (One-hot-encoding) (0) | 2021.04.27 |
| [Pandas] DataFrame의 산술연산 (0) | 2021.04.27 |
| [Pandas] apply, map (0) | 2021.04.27 |
| [Pandas] dtype 변환 (0) | 2021.04.27 |