title: Sklearn LabelEncoder throws TypeError in sort
body: <p>I am learning machine learning using Titanic dataset from Kaggle. I am using LabelEncoder of sklearn to transform text data to numeric labels. The following code works fine for "Sex" but not for "Embarked".</p>
  
  <pre><code>encoder = preprocessing.LabelEncoder()
  features["Sex"] = encoder.fit_transform(features["Sex"])
  features["Embarked"] = encoder.fit_transform(features["Embarked"])
  </code></pre>
  
  <p>This is the error I got </p>
  
  <pre><code>Traceback (most recent call last):
    File "../src/script.py", line 20, in &lt;module&gt;
      features["Embarked"] = encoder.fit_transform(features["Embarked"])
    File "/opt/conda/lib/python3.6/site-packages/sklearn/preprocessing/label.py", line 131, in fit_transform
      self.classes_, y = np.unique(y, return_inverse=True)
    File "/opt/conda/lib/python3.6/site-packages/numpy/lib/arraysetops.py", line 211, in unique
      perm = ar.argsort(kind='mergesort' if return_index else 'quicksort')
  TypeError: '&gt;' not supported between instances of 'str' and 'float'
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/OrdB0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/OrdB0.png" alt="Description of dataset"></a></p>