modin.pandas.Series.quantile¶
- Series.quantile(q=0.5, interpolation='linear') Union[float, Series][source]¶
Return value at the given quantile.
- Parameters:
q (float or array-like of float, default 0.5) – Value between 0 <= q <= 1, the quantile(s) to compute. Currently unsupported if q is a Snowpandas DataFrame or Series.
interpolation ({"linear", "lower", "higher", "midpoint", "nearest"}, default "linear") –
Specifies the interpolation method to use if a quantile lies between two data points i and j:
linear: i + (j - i) * fraction, where fraction is the fractional part of the index surrounded by i and j.
lower: i.
higher: j.
nearest: i or j, whichever is nearest.
midpoint: (i + j) / 2.
Snowpark pandas currently only supports “linear” and “nearest”.
- Returns:
If
qis an array, a Series will be returned where the index isqand the values are the quantiles. Ifqis a float, the float value of that quantile will be returned.- Return type:
float or Series
Examples
With a scalar q:
With a list q:
Values considered NaN do not affect the result: