I am trying to forecast daily profit using time series analysis, but daily profit is not only recorded unevenly, but some of the data is missing.
Raw Data:
| Date | Revenue |
|---|---|
| 2020/1/19 | 10$ |
| 2020/1/20 | 7$ |
| 2020/1/25 | 14$ |
| 2020/1/29 | 18$ |
| 2020/2/1 | 12$ |
| 2020/2/2 | 17$ |
| 2020/2/9 | 28$ |
The above table is an example of what kind of data I have. Profit is not recorded daily, so date between 2020/1/20 and 2020/1/24 does not exist. Not only that, say the profit recorded during the period between 2020/2/3 and 2020/3/8 went missing in the database. I would like to recover this missing data and use time series analysis to predict the profit after 2020/2/9 ~.
My approach was to first aggregate the profit every 6 days since I have to recover the profit between 2020/2/3 and 2020/3/8. So my cleaned data will look something like this
| Date | Revenue |
|---|---|
| 2020/1/16 ~ 2020/1/21 | 17$ |
| 2020/1/22 ~ 2020/1/27 | 14$ |
| 2020/1/28 ~ 2020/2/2 | 47$ |
| 2020/2/3 ~ 2020/2/8 | ? (to predict) |
After applying this to a time series model, I would like to further predict the profit after 2020/2/9 ~. This is my general idea, but as a beginner at Python, using pandas library, I have trouble executing my ideas. Could you please help me how to aggregate the profit every 6 days and have the data look like the above table?