I am working with an hourly temperature dataset and trying to pare it down to daily max/min/average values for a given country in a given year. My code is as follows: