Created
June 7, 2020 07:29
-
-
Save findtharun/1b6e59adc9c33e8575b5e30291eec782 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.preprocessing import LabelEncoder | |
le=LabelEncoder() | |
dataset['variety']=le.fit_transform(dataset['variety']) | |
dataset = pd.concat([dataset['variety'], dataset.drop(['variety'], axis=1)], axis=1) | |
dataset.head(3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment