title: Ignoring missing values in multiple OLS regression with statsmodels
body: <p>I'm trying to run a multiple OLS regression using statsmodels and a pandas dataframe. There are missing values in different columns for different rows, and I keep getting the error message:
  ValueError: array must not contain infs or NaNs
  I saw this SO question, which is similar but doesn't exactly answer my question: <a href="https://stackoverflow.com/questions/19223408/statsmodel-api-logit-valueerror-array-must-not-contain-infs-or-nans">statsmodel.api.Logit: valueerror array must not contain infs or nans</a></p>
  
  <p>What I would like to do is run the regression and ignore all rows where there are missing variables for the variables I am using in this regression. Right now I have:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import statsmodels.formula.api as sm
  
  df = pd.read_csv('cl_030314.csv')
  
  results = sm.ols(formula = "da ~ cfo + rm_proxy + cpi + year", data=df).fit()
  </code></pre>
  
  <p>I want something like missing = "drop".
  Any suggestions would be greatly appreciated. Thanks so much.</p>