Question: how to do anova in python?
Answer: Install the Python package Statsmodels ( pip install statsmodels ) Import statsmodels api and ols: import statsmodels. ...  Import data using Pandas. Set up your model mod = ols('weight ~ group', data=data). ...  Carry out the ANOVA: aov_table = sm. ...  Print the results: print(aov_table)