Question: 13.7 Working with a CSV File Practice working with date/time data from files. The 'AEP_hourly' file contains energy usage for the American Electric Power utility

13.7 Working with a CSV File Practice working with date/time data from files. The 'AEP_hourly' file contains energy usage for the American Electric Power utility compan as part of the PJM Interconnection. The first column contains hourly date/time in the format '12/30/2017 1:00' and the second column contains integer numbers representing the estimated energy consumption in Megawatts. 1. Read in the file 'AEP_hourly.csv' to a dictionary container where the keys are a datetime object and the values are the energy consumption. 2. Convert both columns appropriately 3. Output the day of the week with the highest average energy consumption 4. Output the time (hour) of the day with the highest average energy consumption Hints: use the strptime method from the datetime class create dictionaries to facilitate determining the day of the week and time of the day with the highest average energy consumption
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
