0

I am looking at a history of daily min/max temperatures for the past ~40 years of a specific city (the variable precipitation isn't needed). I imported the CSV file with the aim to calculate an average for the low and high temperature for each winter (I consider the range November-March as winter). So I suppose a solution could be to loop over the years and maybe create a column which consists of "Winter&year" (for instance the first of december 2018 fell in winter 2018 and the 23rd of February 2019 fell in winter 2018 too). I found plenty of examples to aggregate days/months into seasons but nothing where the year changes and I actually struggle with that bit.

The structure of the data is the following:

Could anyone point me to the right direction?

Many thanks

Data

Markus
  • 69
  • 1
  • 9
  • 1. [Please do not upload images of code/errors when asking a question](https://meta.stackoverflow.com/q/285551). 2. Please provide sample data in a [reproducible way](https://stackoverflow.com/questions/20109391). Otherwise people won't be able to test. 3. Please exemplify the expected output explicitly. Your description of your desired column is not very clear. 4. Please show what you have attempted to solve the problem. StackOverflow is not a code-writing service. – Bill Huang Nov 23 '20 at 15:52
  • Mate, that is why I wrote "point me to the right direction" and not "deliver a script". Anyway, it is sorted. I created a "Winter" list, iterated over it and appended MIN & MAX values which I averaged. – Markus Nov 24 '20 at 15:29

0 Answers0