Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# One Hot Encoding
# create an object of the One Hot Encoder
ce_OHE = ce.OneHotEncoder(cols=['gender','city'])
# transform the data
data = ce_OHE.fit_transform(data)
data.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.