I would like to resample a daily dataset to yearly (jul-jun) and count occurrences if the value of the data is greater than a given value.
a sample of the time series:
TEMPdailymax.head()
Out[102]:
localtime
1972-01-20 20.80236
1972-01-21 19.40630
1972-01-22 18.22212
1972-01-23 22.93016
1972-01-24 23.04736
Freq: D, Name: temp, dtype: float64
and I am thinking something like the following:
TEMPcount=(TEMPdailymax.resample('AS-JUN', how={TEMPdailymax.values > 20, 'count'}))
this approach doesn't work but any ideas would be greatly appreciated??