Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import category_encoders as ce
# create an object of the OneHotEncoder
OHE = ce.OneHotEncoder(cols=['Item_Fat_Content',
# encode the categorical variables
train_data = OHE.fit_transform(train_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment