ID ID_0 ID_1 ID_2 ID_3 ID_4
2024-01-01 00:00:00 0.5108 0.7391 0.0527 0.7458 0.4412
2024-01-01 01:00:00 0.9624 0.2985 0.9594 0.6552 0.6766
2024-01-01 02:00:00 0.0639 0.6889 0.6625 0.9658 0.6488
2024-01-01 03:00:00 0.1223 0.3323 0.6660 0.0209 0.6474
2024-01-01 04:00:00 0.1908 0.9349 0.4818 0.4176 0.0652
I have dataframe similar to this with thousands of columns and rows, and I try to calculate hour with maximum value for each ID for each day. And then finally have average hour with maximum value for whole time period for each ID
I tried idxmax with resample, but get attribute error.