📜  一热编码器python代码示例

📅  最后修改于: 2022-03-11 14:46:34.491000             🧑  作者: Mango

代码示例2
from sklearn.compose import ColumnTransformer

ct = ColumnTransformer([('encoder', OneHotEncoder(), [1])], remainder='passthrough')
X = np.array(ct.fit_transform(X), dtype=np.float)