I'd like to execute some preprocessing like this diagram using sklearn's pipelines.
I can do this without any problems if I leave off the standardization step. But I cannot understand how to indicate that the output from the imputation step should flow to the standardization step.
Here is the current code without the standardization step:
preprocessor = ColumnTransformer(
transformers=[
("numeric_imputation", NumericImputation(), dq.numeric_variables),
("onehot", OneHotEncoder(handle_unknown="ignore"), dq.categorical_variables),
],
remainder="passthrough",
)
bp2 = make_pipeline(
preprocessor, ElasticNet()
)