recentpopularlog in

alexpotato : pandas   17

python - Run an OLS regression with Pandas Data Frame - Stack Overflow
>>> import pandas as pd
>>> import statsmodels.formula.api as sm
>>> df = pd.DataFrame({"A": [10,20,30,40,50], "B": [20, 30, 10, 40, 50], "C": [32, 234, 23, 23, 42523]})
>>> result = sm.ols(formula="A ~ B + C", data=df).fit()
statistics  stats  python  regression  pandas 
october 2017 by alexpotato

Copy this bookmark:





to read