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