enter image description here
Please, help. I’m trying to encode the ‘Embarked’ column by OneHotEncoder from Scikit-Learn.
I’ve tryed to run this code and got that error. What’s wrong?
from sklearn.preprocessing import OneHotEncoder
onehotencoder = OneHotEncoder(categories = 11)
df = onehotencoder.fit_transform(df).toarray()
Source: Python Questions