I want to resample my dataframe including hourly precipitation values to daily (frequency of 24 hours) starting at a specific hour in the day (in my case it would start from 2020-02-01 06 UTC).
hourlydataframeimagefor2020-02-01:
I tried:
df = df.resample('24H',on='date').sum()
but this resulted in the sum of hourly precipitation from 2020-02-01 06 UTC to 2020-02-01 23 UTC, instead of a full 24 hours to 2020-02-02 05 UTC.
Is there an argument you can use to fix this issue? I tried origin = 'start', but that resulted in:
TypeError: resample() got an unexpected keyword argument 'origin'
Any guidance will be helpful, thank you!