When I run the aggregation code below using groupby().sum()
, my Date
series' format seems wrong: it seems to return results with future dates after 27.08.2019
even though my series has no dates after that:
Date Obs
8189 2019-08-24 6.597940
8190 2019-08-24 0.758000
8191 2019-08-25 18.260892
8192 2019-08-25 6.590545
8193 2019-08-25 2.919198
8194 2019-08-25 0.838000
8195 2019-08-26 0.798000
8196 2019-08-26 6.597977
8197 2019-08-26 18.010977
8198 2019-08-26 2.882872
8199 2019-08-27 17.941132
8200 2019-08-27 0.847250
8201 2019-08-27 2.864728
8202 2019-08-27 6.730443
This code:
fiyat_w = fiyat_w.groupby('Date').sum()
fiyat_w = fiyat_w.reset_index()
returns aggregated series (daily sums of daily sensor measurements) with observations on future dates:
2057 2019-12-01 27.980334
2058 2019-12-02 24.340758
2059 2019-12-03 21.063112
2060 2019-12-04 25.989285
2061 2019-12-05 27.839916
2062 2019-12-06 27.301501
2063 2019-12-07 27.049580
2064 2019-12-08 26.325082
fiyat_w['Date'].describe()
Out[59]:
count 2065
unique 2065
top 2016-11-14 00:00:00
freq 1
first 2014-01-01 00:00:00
last 2019-12-08 00:00:00
Name: DATE_OF_TRANSACTION, dtype: object
What is the problem?