pandas.Series.quantile

pandas 3.1.1 · Series and accessors · method

Estimate the value at a specified fraction of the sorted distribution.

Call syntax

Series.quantile(q=0.5, interpolation='linear')

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
q Optional
Positional or keyword
Default 0.5
float or array-like

Provide quantiles as fractions between 0 and 1, or a number of quantile bins for qcut.

interpolation Optional
Positional or keyword
Default 'linear'
{'linear', 'lower', 'higher', 'midpoint', 'nearest'}

Choose how to compute results that fall between observed values.

Returns

float or Series