title: sklearn error: "X and y have incompatible shapes."
body: <p>New to scikit learn.  I'm trying to fit a logistic regression to some made up data but I get the error "X and y have incompatible shapes. X has 1 samples, but y has 6."</p>
  
  <pre><code>import pandas as pd
  from sklearn.linear_model import LogisticRegression
  
  # Create a sample dataframe
  data = [['Age', 'ZepplinFan'], [13 , 0], [40, 1], [25, 0], [55, 0], [51, 1], [58, 1]]
  columns=data.pop(0)
  df = pd.DataFrame(data=data, columns=columns)
  
  # Fit Logistic Regression
  lr = LogisticRegression()
  lr.fit(X=df.Age.values, y = df.ZepplinFan)
  </code></pre>
  
  <p><a href="https://stackoverflow.com/a/24935154/2146894">This post</a> indicates that I need to somehow reshape df.Age.values to (n_samples, 1).  How do I do this?</p>