quantiles in python code example
Example 1: np.quantile
numpy.quantile(a, q, axis=None, out=None, overwrite_input=False, interpolation='linear', keepdims=False)
Example 2: calculate quantiles python
>>> np.percentile(df.time_diff, 25) # Q1
0.48333300000000001
>>> np.percentile(df.time_diff, 50) # Q2 (median)
0.5
>>> np.percentile(df.time_diff, 75) # Q3
0.51666699999999999