Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

use functions to resample python

#We can also use custom functions and apply them when resampling using the .apply(method_name) method
#This is an example used in a downsampling example
def custom_resampler(arraylike):
    return np.sum(arraylike) + 5
data.resample('Q').apply(custom_resampler)
 
PREVIOUS NEXT
Tagged: #functions #resample #python
ADD COMMENT
Topic
Name
8+6 =