IIUC
Для того, чтобы получить вышеупомянутые:
# repeated decreasing number of hours
# [2 hr, 1 hr, 0 hr, 2 hr, 1 hr, 0 hr, ...]
d = np.tile(np.arange(3)[::-1], len(df)) * pd.Timedelta(1, unit='H')
# repeat the index 3 times for every entry
# [3:00, 3:00, 3:00, 6:00, 6:00, 6:00, ...]
i = df.index.repeat(3)
df_ = df.loc[i]
# take care of differences
# [3:00, 3:00, 3:00, 6:00, 6:00, 6:00, ...]
# minus
# [2 hr, 1 hr, 0 hr, 2 hr, 1 hr, 0 hr, ...]
# [1:00, 2:00, 3:00, 4:00, 5:00, 6:00, ...]
df_.index -= d
df_
ppt
date
1998-01-01 01:00:00 0.00
1998-01-01 02:00:00 0.00
1998-01-01 03:00:00 0.00
1998-01-01 04:00:00 0.00
1998-01-01 05:00:00 0.00
1998-01-01 06:00:00 0.00
1998-01-01 07:00:00 0.03
1998-01-01 08:00:00 0.03
1998-01-01 09:00:00 0.03
1998-01-01 10:00:00 0.20
1998-01-01 11:00:00 0.20
1998-01-01 12:00:00 0.20
asfreq
и resample
Получить вас так далеко
df.asfreq('H').bfill()
ppt
date
1998-01-01 03:00:00 0.00
1998-01-01 04:00:00 0.00
1998-01-01 05:00:00 0.00
1998-01-01 06:00:00 0.00
1998-01-01 07:00:00 0.03
1998-01-01 08:00:00 0.03
1998-01-01 09:00:00 0.03
1998-01-01 10:00:00 0.20
1998-01-01 11:00:00 0.20
1998-01-01 12:00:00 0.20
Нам не хватает
1998-01-01 01:00:00 0.00
1998-01-01 02:00:00 0.00
в начале