pandas.Series.quantile
- 
Series.quantile(q=0.5, interpolation='linear')[source]
- 
Return value at the given quantile, a la numpy.percentile. Parameters: q : float or array-like, default 0.5 (50% quantile) 0 <= q <= 1, the quantile(s) to compute interpolation : {‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’} New in version 0.18.0. This optional parameter specifies the interpolation method to use, when the desired quantile lies between two data points iandj:- linear: i + (j - i) * fraction, wherefractionis the fractional part of the index surrounded byiandj.
- lower: i.
- higher: j.
- nearest: iorjwhichever is nearest.
- midpoint: (i+j) / 2.
 Returns: quantile : float or Series if qis an array, a Series will be returned where the index isqand the values are the quantiles.Examples>>> s = 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 
- linear: 
    © 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
    https://pandas.pydata.org/pandas-docs/version/0.20.3/generated/pandas.Series.quantile.html