Some of the categorical variable I'm trying to convert to dummy did not convert

Viewed 14

data.type_of_meal_plan.value_counts()

Meal Plan 1 27835

Not Selected 5130

Meal Plan 2 3305

Meal Plan 3 5

Name: type_of_meal_plan, dtype: int64

<IPython.core.display.Javascript object>

When I converted the above variable to dummy and run the logistic regression model, I got this error message

ValueError: could not convert string to float: 'Meal Plan 1'

Does this mean meal plan 1 was not converted to a dummy? How do I fix this?

0 Answers
Related