Return value at the given quantile.
The quantile(s) to compute, which can lie in range: 0 <= q <= 1.
This optional parameter specifies the interpolation method to use, when the desired quantile lies between two data points i and j:
linear: i + (j - i) * (x-i)/(j-i), where (x-i)/(j-i) is the fractional part of the index surrounded by i > j.
lower: i.
higher: j.
nearest: i or j whichever is nearest.
midpoint: (i + j) / 2.
If q
is an array, a Series will be returned where the index is q
and the values are the quantiles, otherwise a float will be returned.
See also
core.window.Rolling.quantile
Calculate the rolling quantile.
numpy.percentile
Returns the q-th percentile(s) of the array elements.
Examples
>>> s = pd.Series([1, 2, 3, 4]) >>> s.quantile(.5) 2.5 >>> s.quantile([.25, .5, .75]) 0.25 1.75 0.50 2.50 0.75 3.25 dtype: float64
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4