adfuller测试收到ValueError:太多值无法解包

JOH*_*HN 2 python pandas statsmodels

我有一些数字存储在一个称为“常量”的变量中

在此处输入图片说明

当我尝试使用来测试均值回归时

cadf = ts.adfuller(constant)
Run Code Online (Sandbox Code Playgroud)

我收到ValueError:太多值无法解包。

我该如何解决?

谢谢!

小智 6

adfuller() 函数仅接受一维时间序列数组,因此请首先使用以下方法对其进行转换:

data1 = data.iloc[:,0].values
Run Code Online (Sandbox Code Playgroud)