title: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(). OneHotEncoder
body: <pre><code>cat_features = train_data.dtypes[train_data.dtypes == 'object'].index
  ohe = OneHotEncoder(cat_features, handle_unknown='ignore')
  
  ohe.fit_transform(train_data)
  </code></pre>
  
  <p>results in </p>
  
  <pre><code>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>
  
  <p>How do I fix this?</p>