title: pandas dataframe conversion for linear regression
body: <p>I read the CSV file and get a dataframe (name: data) that has a few columns, the first a few are in format numeric long(type:pandas.core.series.Series) and the last column(label) is a binary response variable string 'P(ass)'/'F(ail)' </p>
  
  <pre><code>import statsmodels.api as sm
  label = data.ix[:, -1]
  label[label == 'P'] = 1
  label[label == 'F'] = 0
  
  fea = data.ix[:, 0: -1]
  logit = sm.Logit(label, fea)
  result = logit.fit()
  print result.summary()
  </code></pre>
  
  <p>Pandas throws me this error message: <strong>"<em>ValueError: Pandas data cast to numpy dtype of object. Check input data with np.asarray(data)</em>"</strong>
  Numpy,Pandas etc modules are imported already. I tried to convert fea columns to float but still does not go through. Could someone tell me how to correct?<br>
  Thanks</p>
  
  <p>update:  </p>
  
  <pre><code>data.info()
   &lt;class 'pandas.core.frame.DataFrame'&gt;
  Int64Index: 500 entries, 68135 to 3002
  Data columns (total 8 columns):
  TestQty         500 non-null int64
  WaferSize       500 non-null int64
  ChuckTemp       500 non-null int64
  Notch           500 non-null int64
  ORIGINALDIEX    500 non-null int64
  ORIGINALDIEY    500 non-null int64
  DUTNo           500 non-null int64
  PassFail        500 non-null object
  dtypes: int64(7), object(1)
  memory usage: 35.2+ KB
  
  data.sum()
  TestQty            530
  WaferSize         6000
  ChuckTemp        41395
  Notch           135000
  ORIGINALDIEX     12810
  ORIGINALDIEY      7885
  DUTNo           271132
  PassFail            20
  dtype: float64
  </code></pre>