def chek_stationary(x):
result=adfuller(x)
label=['ADF statestic test','p value','num of legs','num of observation']
for value,label in zip(result,label):
print(label + ":" + result)
if result[1] <= 0.05 :
print ('there is evedincee null hypothesis')
print('which means there is no root here ')
print ('and its stationary ')
else :
print ('there isnot evedence and there is root and its nun stationrary')
Whenever I tried this function, I got this error: "can only concatenate str (not "tuple") to str"
What should I do ?
Example of your situation:
Result with the same error thrown: TypeError: can only concatenate str (not "tuple") to str
Fix: - just add str() function before.
Result without error: aaa:('b', 'B')