Python:使用季节分解时出错¶;

Python:使用季节分解时出错¶;,python,pandas,time-series,Python,Pandas,Time Series,我有一个如下所示的数据帧 df: M3.1.3 ts_dt 2019-11-07 09:38:28.850 0.00441 2019-11-07 09:38:31.513 0.00440 2019-11-07 09:38:34.167 0.00434 2019-11-07 09:38:36.821 0.00439 2019-11-07 09:38:40.387 0.00442 其中索引是数据时间。我想做一些时间序列分析 这就是我正在做的

我有一个如下所示的数据帧

df:
                         M3.1.3
ts_dt   
2019-11-07 09:38:28.850 0.00441
2019-11-07 09:38:31.513 0.00440
2019-11-07 09:38:34.167 0.00434
2019-11-07 09:38:36.821 0.00439
2019-11-07 09:38:40.387 0.00442
其中索引是数据时间。我想做一些时间序列分析

这就是我正在做的

from statsmodels.tsa.seasonal import seasonal_decompose
result = seasonal_decompose(df, model='additive')
我犯了这个错误

ValueError: You must specify a freq or x must be a pandas object with a timeseries index with a freq not set to None

我想您可以检查一下,看起来您需要指定df中包含数据的列以及频率。尝试季节分解(df.yourcolumn,freq=1,model='additive')