Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Python中使用stldecompose和Tz感知日期时间的时间序列分解错误_Python_Pandas_Time Series_Statsmodels - Fatal编程技术网

在Python中使用stldecompose和Tz感知日期时间的时间序列分解错误

在Python中使用stldecompose和Tz感知日期时间的时间序列分解错误,python,pandas,time-series,statsmodels,Python,Pandas,Time Series,Statsmodels,我想使用stldocrease 这是我数据的一部分 DateTime PR 0 2011-02-28 00:00:00+01:00 0.868726 1 2011-03-31 00:00:00+02:00 0.860876 2 2011-04-30 00:00:00+02:00 0.825224 3 2011-05-31 00:00:00+02:00 0.817706 4 2011-06-30 00:00:00+02:00 0.806191 如图所

我想使用
stldocrease

这是我数据的一部分

DateTime    PR
0   2011-02-28 00:00:00+01:00   0.868726
1   2011-03-31 00:00:00+02:00   0.860876
2   2011-04-30 00:00:00+02:00   0.825224
3   2011-05-31 00:00:00+02:00   0.817706
4   2011-06-30 00:00:00+02:00   0.806191
如图所示,DateTime是一个Tz感知的DateTime。时区是
欧洲/罗马

当使用
decomp=decompose(obs,period=12)
时,它返回
AttributeError:“RangeIndex”对象没有属性“推断频率”

你知道怎么解决吗?谢谢你的帮助