title: ValueError: Shape mismatch: if categories is an array, The error is not resolved even after specifying the columns as indexes
body: <pre class="lang-py prettyprint-override"><code>    trf1=ColumnTransformer([(&quot;Infuse_val&quot;,SimpleImputer(strategy=&quot;mean&quot;),[0])],remainder=&quot;passthrough&quot;)
      trf4=ColumnTransformer([(&quot;One_hot&quot;,OneHotEncoder(sparse=False,handle_unknown=&quot;ignore&quot;),[1,4])],remainder=&quot;passthrough&quot;)
      trf2=ColumnTransformer([(&quot;Ord_encode&quot;,OrdinalEncoder(categories=[&quot;Strong&quot;,&quot;Mild&quot;]),[3])],remainder=&quot;passthrough&quot;)
      trf3=ColumnTransformer([(&quot;scale&quot;,StandardScaler(),[0,2])],remainder=&quot;passthrough&quot;)
      pipe = Pipeline([
          ('trf1',trf1),
          ('trf2',trf2),
          ('trf3',trf3),
          ('trf4',trf4),
      ])
      pipe.fit(x_train,y_tarin)
  </code></pre>
  <p>Error</p>
  <pre><code>ValueError: Shape mismatch: if categories is an array, it has to be of shape (n_features,).
  </code></pre>
  <p>The table is</p>
  <p><a href="https://i.stack.imgur.com/EDveN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EDveN.png" alt="enter image description here" /></a></p>
  <p>I don't understand what's the error here in my code?</p>