Econometric Backgroud
Fama Macbeth regression refers to a procedure to run regression for panel data (where there are N different individua
A quick and dirty solution to solve the problem and continue using the same thing you were using.
It worked for me.
def fmreg(data,formula): return smf.ols(formula,data=data).fit().params[:] res = df.groupby('date').apply(fmreg,'ret~var1+var2+var3')