Challenge: Build a Preprocessing Workflow
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 2. Kapitel 4
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Suggested prompts:
Can you explain that in more detail?
What are the main benefits or drawbacks?
Can you give me an example?
Großartig!
Completion Rate verbessert auf 5.26
Challenge: Build a Preprocessing Workflow
Swipe um das Menü anzuzeigen
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 2. Kapitel 4
single