Week4 one hot encoding

Here on the notebook, it says “first we will remove teh binary variables, because one hot encoding them would do nothing to them”. But the binary variable Sex is still included here. Is this a mistake?

If it is a mistake, how would you code the variable Sex instead?

The cell in your image is the example set of features.
None of them have been removed yet, that happens in the next cell:

Hi TMosh,

I thought the parameter in the function get_dummies should be the columns that will be converted to one-hot encoding, which means only categorical columns that contain more than 2 values. Why the full column names are provided?

Sorry, I don’t know. I have not studied that assignment.