I have the below code which goes through my dataframe (df_main) and runs one regression (applying sm.OLS()) per each unique value of project_
df_main
sm.OLS()
project_