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
- Python
- matplotlib
- SQL
- 튜닝
- Kaggle
- 오라클
- 알고리즘
- 카카오
- 실기
- 파이썬
- Oracel
- 빅분기
- level 2
- python3
- level 1
- 빅데이터 분석 기사
- seaborn
- 데이터 분석
- sklearn
- 프로그래머스
- 코딩테스트
- 머신러닝
- Numpy
- oracle
- pandas
- R
- 실습
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 |