Pandas Series: quantile() function
Value at the given quantile
The quantile() function is used to get value at the given quantile.
Syntax:
Series.quantile(self, q=0.5, interpolation='linear')
Parameters:
Name | Description | Type/Default Value | Required / Optional |
---|---|---|---|
q | 0 <= q <= 1, the quantile(s) to compute. | float or array-like Default Value: 0.5 (50% quantile) |
Required |
interpolation | This optional parameter specifies the interpolation method to use, when the desired quantile lies between two data points i and j:
|
{‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’} | Required |
Returns: float or Series
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.
Example:
Download the Pandas Series Notebooks from here.
Previous: Product of the values for the requested Pandas axis
Next: Compute numerical data ranks along axis
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework