我有一个看似完全正常的熊猫时间序列,但是熊猫用完全错误的日期绘制它并倒置(倒退时间)。知道为什么以及该做些什么呢?
ds.head()
Out[298]:
datetime
2008-04-01 08:00:00 5.29
2008-04-02 08:00:00 5.28
2008-04-03 08:00:00 5.27
2008-04-04 08:00:00 5.28
2008-04-05 08:00:00 5.34
Name: grwNAP, dtype: float64
ds.tail()
Out[299]:
datetime
2016-11-30 02:00:00 5.313735
2016-11-30 04:00:00 5.311754
2016-11-30 06:00:00 5.312812
2016-11-30 08:00:00 5.310735
2016-11-30 10:00:00 5.309754
Name: grwNAP, dtype: float64
type(ds.index)
Out[300]: pandas.tseries.index.DatetimeIndex
ds.plot()
Out[301]: <matplotlib.axes._subplots.AxesSubplot at 0x11aa287f0>
type(ds.index)
Out[303]: pandas.tseries.index.DatetimeIndex
type(ds)
Out[304]: pandas.core.series.Series