1#We can also use custom functions and apply them when resampling using the .apply(method_name) method
2#This is an example used in a downsampling example
3def custom_resampler(arraylike):
4 return np.sum(arraylike) + 5
5data.resample('Q').apply(custom_resampler)