Challenge: Build a Preprocessing Workflow
Tâche
Swipe to start coding
You are building a basic preprocessing workflow using scikit-learn.
- Use
SimpleImputer(strategy="mean")for numeric columns. - Use
OneHotEncoder(sparse=False)for categorical columns. - Apply both transformations using a
ColumnTransformernamedpreprocessor. - Fit and transform the DataFrame
df. - Store the result in the variable
result.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 4
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Suggested prompts:
Can you explain that in more detail?
What are the main benefits or drawbacks?
Can you give me an example?
Génial!
Completion taux amélioré à 5.26
Challenge: Build a Preprocessing Workflow
Glissez pour afficher le menu
Tâche
Swipe to start coding
You are building a basic preprocessing workflow using scikit-learn.
- Use
SimpleImputer(strategy="mean")for numeric columns. - Use
OneHotEncoder(sparse=False)for categorical columns. - Apply both transformations using a
ColumnTransformernamedpreprocessor. - Fit and transform the DataFrame
df. - Store the result in the variable
result.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 4
single