일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 데이터
- 머신러닝
- Tableau
- Udemy
- Okt
- pyspark
- 파이썬
- selenium
- 형태소분석기
- ionehotencoding
- 데이터분석
- pandas
- Python
- 크롤링
- input
- numpy
- 시각화
- 데이터 분석
- konlpy
- Word Cloud
- 태블로
- iNT
- scikit-learn
- SQL
- 인공지능
Archives
- Today
- Total
목록scikit-learn (1)
반전공자
One-hot encoding with Scikit-learn
# LabelEncoder() + OneHotEncoder() import pandas as pd from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import LabelEncoder x1 = pd.DataFrame({'country':['russia','germany','australia','korea','germany']}) # 데이터 프레임 전체를 라벨인코딩 후 one hot encoding 해야 한다. # LabelEncoding le = LabelEncoder() x2 = x1.apply(le.fit_transform) print(x2) print(type(x2)) # OneHotEncoding encoder =..
데이터분석/데테_인공지능
2021. 6. 20. 20:11