Getting the regression line to plot from a Pandas regression
I have tried with both the (pandas)pd.ols and the (statsmodels)sm.ols to get a regression scatter plot with the regression line , I can get the scatter plot but I can't seem to get the parameters to get the regression line to plot. It is probably obvious that I am doing some cut and paste coding here :-( (using this as a guide: http://nbviewer.ipython.org/github/weecology/progbio/blob/master/ipynbs/statistics.ipynb My data is in a pandas DataFrame and the x column is merged2[:-1].lastqu and the y data column is merged2[:-1].Units My code is now as follows: to get the regression: def fit_line2