October 2018
Intermediate to advanced
134 pages
2h 39m
English
Now, we need to take care of the fact that we have values such as Others, Middle Eastern, and a ? all in the same column. We will have to convert the data to categorical variables so that the machine learning algorithm can read them. These variables are also called one-hot encoded vectors and they can be created easily using pandas:
X = pd.get_dummies(x)
Read now
Unlock full access