title: DataConversionWarning: A column-vector y was passed when a 1d array was expected
body: <p>I keep having an error running this part of my code:</p>
  
  <pre><code>scores = cross_val_score(XGB_Clf, X_resampled, y_resampled, cv=kf)
  </code></pre>
  
  <p>The error is :</p>
  
  <blockquote>
    <p>DataConversionWarning: A column-vector y was passed when a 1d array
    was expected. Please change the shape of y to (n_samples, ), for
    example using ravel().   y = column_or_1d(y, warn=True)</p>
  </blockquote>
  
  <p>I know there are lots of answers to this question, and that I need to use <code>ravel()</code>, but using it does not change anything! </p>
  
  <p>Also, the array "y" I'm passing to the function is <strong><em>not</em></strong> a <em>column-vector</em> ... </p>
  
  <p>See:</p>
  
  <pre><code>y_resampled
  Out[82]: array([0, 0, 0, ..., 1, 1, 1], dtype=int64)
  </code></pre>
  
  <p>When I run </p>
  
  <pre><code>y_resampled.ravel()
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>Out[81]: array([0, 0, 0, ..., 1, 1, 1], dtype=int64)
  </code></pre>
  
  <p>which is exactly the same as my initial variable...</p>
  
  <p>Also, when I run <code>y_resampled.values.ravel()</code> I get an error telling me that this is well a numpy array...</p>
  
  <pre><code>Traceback (most recent call last): 
  File "&lt;ipython-input-80-9d28d21eeab5&gt;", line 1, in &lt;module&gt;
  y_resampled.values.ravel() 
  </code></pre>
  
  <blockquote>
    <p>AttributeError: 'numpy.ndarray' object has no attribute 'values'</p>
  </blockquote>
  
  <p>Does any one of you have a solution to this?</p>
  
  <p>Thanks a lot!</p>