adfuller test received ValueError: too many values to unpack
Asked Answered
D

1

5

I have some numbers stored in a variable called "constant"

enter image description here

When I try to test the mean-reversion by using

cadf = ts.adfuller(constant)

I received ValueError: too many values to unpack.

How can I solve it?

Thanks!

Defeatism answered 19/11, 2017 at 11:27 Comment(4)
Is constant 2d array? adfuller() accepts 1d array only.Pissed
@ElisByberi Thanks! I used cadf = ts.adfuller(constant[0]), then its ok.Defeatism
Find the answer here: #43100941Epitaph
That's answered here: #43100941Hammerlock
R
11

adfuller() function accepts only 1d array of time series so first convert it using:

data1 = data.iloc[:,0].values
Rightminded answered 9/8, 2018 at 7:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.