search#

pylibcudf.search.contains(
Column haystack,
Column needles,
stream: CudaStreamLike | None = None,
DeviceMemoryResource mr=None,
) Column#

Check whether needles are present in haystack.

For details, see contains().

Parameters:
haystackColumn

The search space.

needlesColumn

The values for which to search.

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

Boolean indicator for each needle.

pylibcudf.search.lower_bound(Table haystack, Table needles, list column_order: list[Order], list null_precedence: list[NullOrder], stream: CudaStreamLike | None = None, DeviceMemoryResource mr=None) Column#

Find smallest indices in haystack where needles may be inserted to retain order.

For details, see lower_bound().

Parameters:
haystackTable

The search space.

needlesTable

The values for which to find insertion points.

column_orderList[ColumnOrder]

Whether each column should be sorted in ascending or descending order.

null_precedenceList[NullOrder]

Whether nulls should come before or after non-nulls.

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 insertion points

pylibcudf.search.upper_bound(Table haystack, Table needles, list column_order: list[Order], list null_precedence: list[NullOrder], stream: CudaStreamLike | None = None, DeviceMemoryResource mr=None) Column#

Find largest indices in haystack where needles may be inserted to retain order.

For details, see upper_bound().

Parameters:
haystackTable

The search space.

needlesTable

The values for which to find insertion points.

column_orderList[ColumnOrder]

Whether each column should be sorted in ascending or descending order.

null_precedenceList[NullOrder]

Whether nulls should come before or after non-nulls.

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 insertion points