Hello to the whole community. I am new to this language and would like to ask for your help please. I have 8760 electricity production data, that is, the amount of energy for each hour of the year. However, I would like to have only one average day for each month (I put a picture for reference). Could you help me or give me some idea how I could do this please.

Obviously, for each month I have 28, 30 or 31 days, depending on the month.

I have tried to divide the entire list of data, into sublists of each month and then each month in days, to be able to handle it better. Then for each month, I had thought of using something like:

for k in range (0.31):

for j in range (0,24):

Can you help me please.

Thank you very much in advance