January 2020
Beginner to intermediate
432 pages
11h 24m
English
pandas contains a very useful function we can use for one-hot encoding, namely pd.get_dummies. The example syntax looks like the following:
X_train = pd.get_dummies(X_train, prefix_sep='_', drop_first=True)
Read now
Unlock full access