title: Sklearn preprocessing label encoder is throwing error for mutiple columns
body: <p>I have pandas Data Frame with following structure</p>
  
  <pre><code>item_condition_id                     category
  brand_name                            category
  price                                  float64
  shipping                              category
  main_category                         category
  category                              category
  sub_category                          category
  hashing_feature_aa                     float64
  hashing_feature_ab                     float64
  </code></pre>
  
  <p>Example with portion of data:</p>
  
  <pre><code>brand_name  shipping  main_category        category
  Target         1         Women           Tops &amp; Blouses
  unknown        1          Home           Home Décor
  unknown        0         Women            Jewelry
  unknown        0         Women             Other
  </code></pre>
  
  <p>I have converted categorical (Strings) columns to numerical using below code.</p>
  
  <pre><code>from sklearn.preprocessing import LabelEncoder
  le = LabelEncoder()
  for i in range(len(X)):
      X.iloc[:,i] = le.fit_transform(X.iloc[:,i])
  </code></pre>
  
  <p>After Conversion</p>
  
  <pre><code>   brand_name  shipping  main_category  category
          0         1              1         3
          1         1              0         0
          1         0              1         1
          1         0              1         2
  </code></pre>
  
  <p>This is working as expected but while trying apply <strong>inverse_transform</strong> to get the original categories from numerical categories it  is throwing error.</p>
  
  <pre><code>for i in range(len(X)):
      X.iloc[:,i] = le.inverse_transform(X.iloc[:,i])
  </code></pre>
  
  <blockquote>
    <p>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()</p>
  </blockquote>
  
  <p>How to resolve this error in my case , what's wrong with my code ?</p>
  
  <p>My goal is convert categorical (strings) features to numerical using Label Encoder in order to apply <em>sklearn.feature_selection.SelectKbest.fit_transform(X,y)</em>, without label encoding this step is failing.</p>
  
  <p>Thanks</p>