I have a dataframe with a pandas datetime index.
TIMESTAMP water
2020-06-24 13:50:00 -0.5
2020-06-24 14:00:00 -0.6
2020-06-24 14:10:00 -0.7
2020-06-24 14:30:00 -0.5
2020-06-24 14:40:00 -0.8
...
I want to get the index of the daily minimum value. This is my approach which is not working:
water_daily_min_index = df['water'].resample('D').idxmin()
How can I solve this without creating a loop?
Use
Grouper
like alternative toresample
: