title: How can I calculate seasonal average temperatures for each season in every year?
body: <p>I need to calculate seasonal average temperatures for each season in every year. The seasons are winter (December, January, February), spring (March, April, May), summer (June, July, August) and autumn (September, October, November). At first I think I need to group the data and then create a loop but I don't know how.</p>
  <p>This is how I started my code:</p>
  <pre><code>#Creating a new dataframe to simplify data
  
  data_winter = data[['DATE', 'TAVG_C']]
  
  #Slicing the column DATE to years and months
  
  data_winter['YEAR_MONTH'] = data['DATE'].str.slice(start=0, stop=6)
  
  #Grouped the data
  
  grouped = data_winter.groupby('YEAR_MONTH')
  
  
  data_winter
  
  </code></pre>
  <p>And in the picture you can see my Dataframe.
  <a href="https://i.stack.imgur.com/n66B3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n66B3.png" alt="enter image description here" /></a></p>