I just started using Python as hobby, so forgive me if this is a dumb question.
I recently installed a power meter on my computer, and I'm using it to track its power consumption. It gives me real-time minute readings exported to a csv file.
I have parsed and read the file, and now I have a dictionary where the key is a timestamp, stored as a struct_time from the time library. Currently, the dictionary has readings which were taken every minute. I'd like to create a new dictionary whose keys are hour timestamps, and whose values are the sum of the individual minute readings.
I thought about looping through the dictionary with a counter mod 60, but I'm told that isn't very Pythonic. Also, there's no guarantee that there exists 60 readings for every hour. How should I do this?