Login using Social Account
     Continue with GoogleLogin using your credentials
Let's build the pipeline for the numerical attributes:
Create the pipeline and save it in a variable named num_pipeline
:
from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImputer
<< your code goes here >> = Pipeline([
("select_numeric", DataFrameSelector(["Age", "SibSp", "Parch", "Fare"])),
("imputer", SimpleImputer(strategy="median")),
])
Now fit the training data in this pipeline:
num_pipeline.fit_transform(<< your code goes here >>)
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Loading comments...