Skip to content

Instantly share code, notes, and snippets.

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment