Open ValentinKaisermayer opened 1 year ago
Computing the daily mean from hourly data is easy, since it is simply 24 vales each, but the monthly or yearly mean would be harder, since not every period might be of the same length.
@chiraganand @codetalker7 Your thoughts on this feature?
One easy way is to simply apply the given method, i.e. month
to the timestamps and then compute the intervals for the aggregation when this changes. idx = findall(diff(month.(timestamps)))
. Or in a for-loop.
Doesn't apply()
handle this use case?
The method should accept a Dates.Period and apply a function to each of those periods in the TSFrame. Like computing the daily mean of hourly data. Control over the time index that is used in the output would also be nice. Like should the first be used or the last in the period.