일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- scikit-learn
- ionehotencoding
- Word Cloud
- iNT
- SQL
- Udemy
- 파이썬
- 데이터분석
- numpy
- 형태소분석기
- Okt
- Tableau
- 인공지능
- pandas
- input
- 태블로
- Python
- 크롤링
- 시각화
- pyspark
- 머신러닝
- konlpy
- 데이터
- 데이터 분석
- selenium
Archives
- Today
- Total
목록ionehotencoding (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