np.nanpercentile() - there has to be a faster way! – KRSTN
https://krstn.eu/np.nanpercentile()-there-has-to-be-a-faster-wayThis is represented as a numpy.ndarray of the shape(96, 4800, 4800) - in other words 96 satellite images each measuring 4800 by 4800 pixels. I want to calculate the 10th, 25th, 50th, 75th and 90th quantile along the time/z-axis, which can be done easily with np.percentile(a, q=[10,25,50,75,90], axis=0).
Aggregating Quantiles with Pandas
https://skeptric.com/pandas-aggregate-quantile23.04.2021 · One of my favourite tools in Pandas is agg for aggregation (it's a worse version of dplyrs summarise).Unfortunately it can be difficult to work with for custom aggregates, like nth largest value.If your aggregate is parameterised, like quantile, you potentially have to define a function for every parameter you use.