bigframes.pandas.DataFrame.quantile#

DataFrame.quantile(q: float | Sequence[float] = 0.5, *, numeric_only: bool = False)[source]#

Return values at the given quantile over requested axis.

Examples:

>>> import bigframes.pandas as bpd
>>> df = bpd.DataFrame(np.array([[1, 1], [2, 10], [3, 100], [4, 100]]),
...                   columns=['a', 'b'])
>>> df.quantile(.1)
a    1.3
b    3.7
Name: 0.1, dtype: Float64
>>> df.quantile([.1, .5])
       a     b
0.1  1.3   3.7
0.5  2.5  55.0

[2 rows x 2 columns]
Parameters:
  • q (float or array-like, default 0.5 (50% quantile)) – Value between 0 <= q <= 1, the quantile(s) to compute.

  • numeric_only (bool, default False) – Include only float, int or boolean data.

Returns:

If q is an array, a DataFrame will be returned where the index is q, the columns are the columns of self, and the values are the quantiles. If q is a float, a Series will be returned where the index is the columns of self and the values are the quantiles.

Return type:

bigframes.pandas.DataFrame or bigframes.pandas.Series