CommencerCommencer gratuitement

One-hot encoding

In the previous exercise, we encountered a dataframe df1 which contained categorical features and therefore, was unsuitable for applying ML algorithms to.

In this exercise, your task is to convert df1 into a format that is suitable for machine learning.

Cet exercice fait partie du cours

Feature Engineering for NLP in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Print the features of df1
print(____.____)
Modifier et exécuter le code