解决 endog and exog matrices are different sizes 报错:ValueError: endog and exog matrices are different sizes 解决办法:加上order = (3,1,0) AR = ARIMA(df_diff,order=(3,1,0)).fit() 问题就没有了