I want to encode 3 categorical features out of 10 features in my datasets. I use preprocessing from sklearn.preprocessing to do so as the following:
preprocessing
<
If the dataset is in pandas data frame, using
pandas.get_dummies
will be more straightforward.
*corrected from pandas.get_getdummies to pandas.get_dummies