Kołać wyniki modelu OLS

df = pd.read_csv("df.csv", sep=";")
df_coef =[]
status = list(set(df['status']))
for status in status:
    df_redux = df[df['status']==status]
    X = df_redux[['a', 'b', 'c', 'd']]
    Y = df_redux['y_Values']

    model = sm.OLS(Y, X).fit()
    predictions = model.predict(X)
    stats_2 = pd.read_html(model.summary().tables[1].as_html(),header=0,index_col=0)[0]
    predictions = pd.DataFrame(predictions, columns = ['predictions'])
    gf = pd.concat([predictions, df_redux], axis=1)
    df_coef.append(gf)

all_coef = pd.concat(df_coef)
Lucas Feinberg