0

I'm trying to use OneHotEncoding on the categorical variables of the following dataset.

Error

ohe = OneHotEncoder(categorical_features = [5])
X = ohe.fit_transform(data).toarray()

Can someone help me to understand why this error occurs and how to solve this?

I'm trying to use the OneHotEncoder and here's what I've done so far:

Ajeet Verma
  • 2,938
  • 3
  • 13
  • 24
Idan
  • 1
  • 1

0 Answers0