title: sklearn: Found arrays with inconsistent numbers of samples when calling LinearRegression.fit()
body: <p>Just trying to do a simple linear regression but I'm baffled by this error for:</p>
  
  <pre><code>regr = LinearRegression()
  regr.fit(df2.iloc[1:1000, 5].values, df2.iloc[1:1000, 2].values)
  </code></pre>
  
  <p>which produces:</p>
  
  <pre><code>ValueError: Found arrays with inconsistent numbers of samples: [  1 999]
  </code></pre>
  
  <p>These selections must have the same dimensions, and they should be numpy arrays, so what am I missing? </p>