title: Issue with sm.OLS.from_formula('variable1 ~ variable2 + x ') with statsmodels
body: <p>If I run the function <code>advanced_stats(['one', 'two', 'three'], 'myFile.csv')[0].summary()</code> or <code>advanced_stats(['one', 'two', 'three'], 'myFile.csv')[0].pvalues</code> then the function below will output <code>file[independent]</code> and <code>file[dependent]</code> instead of the actual names <code>'one', 'two' or 'three'</code>
   I need to know the column name when the values are outputted. The calculation and code works perfectly but the labels are important because I use them as part of my dataframe. So, I need to know how I can output the title 'one' instead of <code>file[dependent]</code>.</p>
  
  <pre><code>def advanced_stats(categories, file):
  
      finalData = []
      for dependent in categories:
          for independent in categories:
              if dependent == independent:
                  pass
              else:
                  model = sm.OLS.from_formula('file[dependent] ~ file[independent] + age + sex + height', file).fit()
                  finalData.append(model)
  
      return finalData
  </code></pre>