I am very new at coding and need some guidance. I am attempting to forecast the timing of the daily peak load (hour in which the peak load occurs). Here is a snapshot of the first day in 2002 data: During the first hour on January 1, 2002, the average, median, maximum, and minimum temperatures were recorded as 43, 43, 60, and 31 degrees Fahrenheit, respectively. In this same hour, a total of 1,384,494 MWh (megawatt-hours) of electricity load was consumed.
Essentially trying to find the maximum values of load per 24 hours and then its corresponding time.So far I have this but it not working.
max_Load = df3.groupby(df3.index // 24)['Load'].idxmax()
max_df = df3.loc[max_Load.index * 24].reset_index(drop=True)
max_df['max_Load'] = max_Load.valuesmax_df
Included in the picture is what it outputs: Max load is way off