trf1=ColumnTransformer([("Infuse_val",SimpleImputer(strategy="mean"),[0])],remainder="passthrough")
trf4=ColumnTransformer([("One_hot",OneHotEncoder(sparse=False,handle_unknown="ignore"),[1,4])],remainder="passthrough")
trf2=ColumnTransformer([("Ord_encode",OrdinalEncoder(categories=["Strong","Mild"]),[3])],remainder="passthrough")
trf3=ColumnTransformer([("scale",StandardScaler(),[0,2])],remainder="passthrough")
pipe = Pipeline([
('trf1',trf1),
('trf2',trf2),
('trf3',trf3),
('trf4',trf4),
])
pipe.fit(x_train,y_tarin)
Error
ValueError: Shape mismatch: if categories is an array, it has to be of shape (n_features,).
The table is
I don't understand what's the error here in my code?