from statsmodels.formula.api import ols
cw = pd.read_csv('ChickWeight.csv')
cw_lm = ols('weight ~ Time + C(Diet)', data=cw).fit()
print(sm.stats.anova_lm(cw_lm, typ=2))
ANOVA in python using pandas dataframe with statsmodels or scipy?