How it works...
In this recipe, we identified the local maxima and minima in the daily energy consumed by house appliances. First, we loaded the Appliances energy prediction dataset from the UCI Machine Learning Repository and extracted different parts of time, that is, day, month, and hour, from the datetime variable, as we discussed in the Deriving representations of year and month and Extracting time parts from a time variable recipes of Chapter 7, Deriving Features from Date and Time Variables.
Next, we plotted the mean energy consumed per hour, or the mean energy consumed per day and month, using pandas groupby(), pandas mean(), and pandas plot().
Next, we created a pandas time series with the mean energy consumed by appliances per day ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access