title: Applying sklearn function to pandas dataframe gives ValueError("Unknown label type: %r" % y)
body: <p>The following code gives an error message:</p>
  
  <pre><code>    &gt;&gt;&gt; import pandas as pd
      &gt;&gt;&gt; from sklearn import preprocessing, svm
      &gt;&gt;&gt; df = pd.DataFrame({"a": [0,1,2], "b":[0,1,2], "c": [0,1,2]})
      &gt;&gt;&gt; clf = svm.SVC()
      &gt;&gt;&gt; df = df.apply(lambda x: preprocessing.scale(x))
      &gt;&gt;&gt; clf.fit(df[["a", "b"]], df["c"])
      Traceback (most recent call last):
        File "&lt;stdin&gt;", line 1, in &lt;module&gt;
        File "C:\Users\Alexander\Anaconda\lib\site-packages\sklearn\svm\base.py", lin
       151, in fit
          y = self._validate_targets(y)
        File "C:\Users\Alexander\Anaconda\lib\site-packages\sklearn\svm\base.py", lin
       515, in _validate_targets
          check_classification_targets(y)
        File "C:\Users\Alexander\Anaconda\lib\site-packages\sklearn\utils\multiclass.
      y", line 173, in check_classification_targets
          raise ValueError("Unknown label type: %r" % y)
      ValueError: Unknown label type: 0   -1.224745
      1    0.000000
      2    1.224745
      Name: c, dtype: float64
  </code></pre>
  
  <p>The dtype of the pandas DataFrame is not an object, so applying the sklearn svm function should be fine, but for some reason it does not recognize the classification labels. What is causing this issue?</p>