# quantiles#

cudf._lib.pylibcudf.quantiles.quantile(Column input, vector[double] q, interpolation interp=interpolation.LINEAR, Column ordered_indices=None, bool exact=True) #

Computes quantiles with interpolation.

Computes the specified quantiles by interpolating values between which they lie, using the interpolation strategy specified in interp.

Parameters:
input: Column

The Column to calculate quantiles on.

q: array-like that implements buffer-protocol

The quantiles to calculate in range [0,1]

interp: Interpolation, default Interpolation.LINEAR

The strategy used to select between values adjacent to a specified quantile.

ordered_indices: Column, default empty column

The column containing the sorted order of input.

If empty, all input values are used in existing order. Indices must be in range [0, input.size()), but are not required to be unique. Values not indexed by this column will be ignored.

exact: bool, default True

Returns doubles if True. Otherwise, returns same type as input

For details, see :cpp:func:`quantile`.
Returns:
Column

A Column containing specified quantiles, with nulls for indeterminable values

cudf._lib.pylibcudf.quantiles.quantiles(Table input, vector[double] q, interpolation interp=interpolation.NEAREST, sorted is_input_sorted=sorted.NO, list column_order=None, list null_precedence=None) #

Computes row quantiles with interpolation.

Computes the specified quantiles by retrieving the row corresponding to the specified quantiles. In the event a quantile lies in between rows, the specified interpolation strategy is used to pick between the rows.

Parameters:
input: Table

The Table to calculate row quantiles on.

q: array-like

The quantiles to calculate in range [0,1]

interp: Interpolation, default Interpolation.NEAREST

The strategy used to select between values adjacent to a specified quantile.

Must be a non-arithmetic interpolation strategy (i.e. one of {Interpolation.HIGHER, Interpolation.LOWER, Interpolation.NEAREST})

is_input_sorted: Sorted, default Sorted.NO

Whether the input table has been pre-sorted or not.

column_order: list, default None

A list of Order enums, indicating the desired sort order for each column. By default, will sort all columns so that they are in ascending order.

Ignored if is_input_sorted is Sorted.YES

null_precedence: list, default None

A list of NullOrder enums, indicating how nulls should be sorted. By default, will sort all columns so that nulls appear before all other elements.

Ignored if is_input_sorted is Sorted.YES

For details, see :cpp:func:`quantiles`.
Returns:
Column

A Column containing specified quantiles, with nulls for indeterminable values