【发布时间】:2021-09-24 21:15:32
【问题描述】:
一般来说,我们会df.drop('column_name', axis=1) 来删除 DataFrame 中的一列。
我想将此转换器添加到管道中
例子:
numerical_transformer = Pipeline(steps=[('imputer', SimpleImputer(strategy='mean')),
('scaler', StandardScaler(with_mean=False))
])
我该怎么做?
【问题讨论】:
标签: python machine-learning scikit-learn pipeline