DataFrameGroupBy.quantile(self, q=0.5, interpolation='linear') [source]
Return group values at the given quantile, a la numpy.percentile.
| Parameters: | 
  |  
|---|---|
| Returns: | 
  |  
See also
Series.quantile DataFrame.quantile numpy.percentile
>>> df = pd.DataFrame([
...     ['a', 1], ['a', 2], ['a', 3],
...     ['b', 1], ['b', 3], ['b', 5]
... ], columns=['key', 'val'])
>>> df.groupby('key').quantile()
    val
key
a    2.0
b    3.0
 
    © 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.25.0/reference/api/pandas.core.groupby.DataFrameGroupBy.quantile.html