The data is currently monthly data. I would like to find the average of the 12 months into a yearly data. At the same time I need to have that number for each of the 1947.

input float year double CPIAUCSL
1947 21.48
1947 21.62
1947 22
1947 22
1947 21.95
1947 22.08
1947 22.23
1947 22.4
1947 22.84
1947 22.91
1947 23.06
1947 23.41

How could I do this?