title: DataConversionWarning fitting RandomForestRegressor in Scikit
body: <p>I'm trying to fit a RandomForestRegressor to my training set,</p>
  
  <pre><code>rfr.fit(train_X , train_y)
  </code></pre>
  
  <p>but keep getting the following warning: </p>
  
  <blockquote>
    <p>/usr/local/lib/python2.7/dist-packages/IPython/kernel/<strong>main</strong>.py:1: 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().
      if <strong>name</strong> == '<strong>main</strong>':</p>
  </blockquote>
  
  <p>I am using Pandas, and therefore assumed that the training set might need to be in numpy arrays, so called .values:</p>
  
  <pre><code>train_y = train[label].values
  train_X = train[features].values
  </code></pre>
  
  <p>Checking to see the type, and shape: </p>
  
  <pre><code>print type(train_X), train_X.shape
  print type(train_y), train_y.shape
  </code></pre>
  
  <p>Returns: </p>
  
  <pre><code>&lt;type 'numpy.ndarray'&gt; (20457, 44)  
  &lt;type 'numpy.ndarray'&gt; (20457, 1)
  </code></pre>
  
  <p>Not really sure what to do next, only found <a href="https://stackoverflow.com/questions/20868664/should-a-pandas-dataframe-column-be-converted-in-some-way-before-passing-it-to-a">this answer</a> but it wasn't much help. </p>
  
  <p>It does actually output a result, but I have no idea if it is the right one. With cross validation, it keeps creating that warning over and over again.</p>