rolling#

class pylibcudf.rolling.BoundedClosed#

A bounded closed window.

This window contains rows with delta of the current row, endpoints included.

Parameters:
delta

Offset from current row, must be valid. If floating point must not be inf/nan.

Attributes

delta

class pylibcudf.rolling.BoundedOpen#

A bounded open window.

This window contains rows with delta of the current row, endpoints excluded.

Parameters:
delta

Offset from current row, must be valid. If floating point must not be inf/nan.

Attributes

delta

class pylibcudf.rolling.CurrentRow#

A current row rolling window.

This window contains all rows that are equal to the current row in the group.

class pylibcudf.rolling.RollingRequest(Column values, size_type min_periods, Aggregation aggregation)#

A request for a rolling aggregation.

Parameters:
values

The column of values to aggregate.

min_periods

The minimum number of observations required for a valid result in a given window.

aggregation

The aggregation to perform.

class pylibcudf.rolling.Unbounded#

An unbounded rolling window.

This window runs to the begin/end of the current row’s group.

pylibcudf.rolling.grouped_range_rolling_window(signatures, args, kwargs, defaults, _fused_sigindex_ref=[None])#

Perform grouping-aware range-based rolling window aggregations on some columns.

Parameters:
group_keys

Possibly empty table of sorted keys defining groups.

orderby

Column defining window ranges. Must be sorted, if group_keys is not empty, must be sorted groupwise.

order

Sort order of the orderby column.

null_order

Null sort order in the sorted orderby column

preceding

The type of the preceding window offset.

following

The type of the following window offset.

requests

List of RollingRequest objects.

streamStream | None

CUDA stream on which to perform the operation.

mrDeviceMemoryResource | None

Device memory resource used to allocate the returned table’s device memory.

Returns:
A table of results, one column per input request, in order of the
input requests.
pylibcudf.rolling.rolling_window(signatures, args, kwargs, defaults, _fused_sigindex_ref=[None])#

Perform a rolling window operation on a column

For details, see cudf::rolling_window documentation.

Parameters:
sourceColumn

The column to perform the rolling window operation on.

preceding_windowUnion[Column, size_type]

The column containing the preceding window sizes or a scalar value indicating the sizes of all windows.

following_windowUnion[Column, size_type]

The column containing the following window sizes or a scalar value indicating the sizes of all windows.

min_periodsint

The minimum number of periods to include in the result.

aggAggregation

The aggregation to perform.

streamStream | None

CUDA stream on which to perform the operation.

mrDeviceMemoryResource | None

Device memory resource used to allocate the returned column’s device memory.

Returns:
Column

The result of the rolling window operation.