从 python 中的 ARIMA 模型摘要中提取值

extract values from ARIMA model summary in python

我想从 arima 结果摘要中提取特定值。例如要保存在数据框中的模型和 AIC。我在 运行 result.summary

上提到 table

ARIMA 模型结果

Dep. Variable:          D.Order_Count   No. Observations:                  543
Model:                 ARIMA(4, 1, 4)   Log Likelihood               
-1589.811
Method:                       css-mle   S.D. of innovations              4.492
Date:                Wed, 11 Apr 2018   AIC                           3199.622
Time:                        12:35:05   BIC                           3242.593
Sample:                    07-02-2015   HQIC                          3216.424
                     - 07-31-2017     

如何在 Python

中执行此操作

使用fit对象。它有属性aic:例如,

arima_model = ARIMA(df['mm'],order=(7,1,1))
arima_fit = arima_model.fit()
print(arima_fit.aic)