Is it possible to add binned_statistic
to dask.stats
? Or other solutions like embedding it in apply.ufunc()
?
Here's an example using scipy.stats
:
from scipy.stats import binned_statistic
import numpy as np
x = np.arange(500)
values = x*50
statistics, _, _ = binned_statistic(x, values, statistic='min', bins=500, range=(0, 500))