title: How to store elements from my regression in a new dataframe?
body: <p>My problem is that I am trying to regress many individual columns against one set column. I've created a for loop that is successful at doing this, however I need a method that's able to record the important results of the regression before the data is overwritten by the next regression in the loop. Right now I have </p>
  
  <pre><code>    WTI_results=[]
      for i in range(13):
          OLSWTI= sm.OLS(df_opec.iloc[0:39,i],df_opec['WTI_price']).fit()
          d={[df_opec.columns[i]],[OLSWTI.params], [OLSWTI.rsquared],[OLSWTI.pvalues]}
      WTI_results=pd.DataFrame(data=d)
      WTI_results.columns= ['Country', 'Beta', 'R-Squared', 'P-Value']
      print(WTI_results)
  </code></pre>
  
  <p>This returns TypeError: unhashable type: 'list' right now, but I'm not even sure if this is an appropriate way to be going about it. D is probably just overwriting itself as well but I'm not sure. Thanks so much for any help.</p>