Skip to content

Instantly share code, notes, and snippets.

@sagarhowal
Last active December 25, 2017 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagarhowal/d64c183e9f6d830a7c023a45cf1e8a41 to your computer and use it in GitHub Desktop.
Save sagarhowal/d64c183e9f6d830a7c023a45cf1e8a41 to your computer and use it in GitHub Desktop.
Encoding Categorical Data
#Encoding Categorical Data
from sklearn.preprocessing import LabelEncoder
labelencoder = LabelEncoder()
y = labelencoder.fit_transform(y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment