title: sklearn throws ValueError: bad input shape (600000, 24)
body: <p>Below is a piece of my code for Label Encoding. While implementing Label Encoder for one column of the Dataframe at a time, it worked fine. But, when I tried to implement on whole categorical features at once <code>sklearn</code> throws</p>
  <blockquote>
  <p><strong>ValueError: bad input shape (600000, 24). I'm not able to find any specific reason for that</strong>.</p>
  </blockquote>
  <pre><code>df = pd.read_csv(&quot;../inputs/cat-in-the-dat-train-folds.csv&quot;)
      
  # extracting the categorical features 
  cat_features = [x for x in df.columns if x not in ( &quot;id&quot;, &quot;target&quot;, &quot;kflod&quot;)]
      
  for col in cat_features:
      df.loc[:, col] = df[col].astype(str).fillna(&quot;NONE&quot;)
  df_train = df[df[&quot;kfold&quot;] != fold].reset_index(drop=True)
  df_valid = df[df[&quot;kfold&quot;] == fold].reset_index(drop=True)
  lbl_enc = preprocessing.LabelEncoder()
  full_cat_data = pd.concat(
          [df_train[cat_features], df_valid[cat_features]],
          axis=0)
  lbl_enc.fit(full_cat_data)
  x_train = lbl_enc.transform(df_train[cat_features])
  x_valid = lbl_enc.transform(df_valid[cat_features])
  </code></pre>