Challenge: Build a Preprocessing Workflow
Task
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
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 4
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain that in more detail?
What are the main benefits or drawbacks?
Can you give me an example?
Awesome!
Completion rate improved to 5.26
Challenge: Build a Preprocessing Workflow
Swipe to show menu
Task
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
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 4
single