Assuming that you have a Pandas DataFrame named df with the index representing the dates for the 7 days ahead and the values representing the forecasts, you can use the resample method to take only the values that correspond to the first day of the forecast and create a new time series with these values. Here is an example of how to do it:
main.py345 chars10 lines
In this example, ts will be a new time series with the values [1, NaN, NaN, NaN, NaN, NaN, NaN], where the first value corresponds to the first day of the forecast and the other values are NaN because there are no forecasts for those dates.
gistlibby LogSnag