pandas.core.window.expanding.Expanding.quantile

Expanding.quantile(quantile, interpolation='linear', numeric_only=False, **kwargs)[source]

Calculate the expanding quantile.

Parameters
quantilefloat

Quantile to compute. 0 <= quantile <= 1.

interpolation{‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’}

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) * 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.

numeric_onlybool, default False

Include only float, int, boolean columns.

New in version 1.5.0.

**kwargs

For NumPy compatibility and will not have an effect on the result.

Deprecated since version 1.5.0.

Returns
Series or DataFrame

Return type is the same as the original object with np.float64 dtype.

See also

pandas.Series.expanding

Calling expanding with Series data.

pandas.DataFrame.expanding

Calling expanding with DataFrames.

pandas.Series.quantile

Aggregating quantile for Series.

pandas.DataFrame.quantile

Aggregating quantile for DataFrame.