title: sklearn OneHotEncoder broken- ValueError: could not convert string to float
body: <p>I took this example from the sklearn OneHotEncoder documentary page:</p>
  
  <pre><code>from sklearn.preprocessing import OneHotEncoder
  enc = OneHotEncoder(handle_unknown='ignore')
  X = [['Male', 1], ['Female', 3], ['Female', 2]]
  enc.fit(X)
  enc.categories_
  
  enc.transform([['Female', 1], ['Male', 4]]).toarray()
  
  enc.inverse_transform([[0, 1, 1, 0, 0], [0, 0, 0, 1, 0]])
  
  enc.get_feature_names()
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>ValueError: could not convert string to float: 'Male'.</p>
  </blockquote>
  
  <p>When I replace "Male" and "Female" with numbers:
  <code>X = [['5', 1], ['4', 3], ['4', 2]]</code></p>
  
  <p>I get :</p>
  
  <blockquote>
    <p>AttributeError: 'OneHotEncoder' object has no attribute 'categories_'</p>
  </blockquote>
  
  <p>My sklearn version is 0.19.1
  Can someone reproduce this?</p>