lists#
- cudf._lib.pylibcudf.lists.apply_boolean_mask(Column input, Column boolean_mask) Column #
Filters elements in each row of the input lists column using a boolean mask
For details, see
apply_boolean_mask()
.- Parameters:
- inputColumn
The input column.
- boolean_maskColumn
The boolean mask.
- Returns:
- Column
A Column of filtered elements based upon the boolean mask.
- cudf._lib.pylibcudf.lists.concatenate_list_elements(Column input, bool dropna) Column #
Concatenate multiple lists on the same row into a single list.
- Parameters:
- inputColumn
The input column
- dropnabool
If true, null list elements will be ignored from concatenation. Otherwise any input null values will result in the corresponding output row being set to null.
- Returns:
- Column
A new Column of concatenated list elements
- cudf._lib.pylibcudf.lists.concatenate_rows(Table input) Column #
Concatenate multiple lists columns into a single lists column row-wise.
- Parameters:
- inputTable
The input table
- Returns:
- Table
A new Column of concatenated rows
- cudf._lib.pylibcudf.lists.contains(signatures, args, kwargs, defaults, _fused_sigindex={})#
Create a column of bool values indicating whether the search_key is contained in the input.
search_key
may be aColumn
or aScalar
.For details, see
contains()
.- Parameters:
- inputColumn
The input column.
- search_keyUnion[Column, Scalar]
The search key.
- Returns:
- Column
A new Column of bools indicating if the search_key was found in the list column.
- cudf._lib.pylibcudf.lists.contains_nulls(Column input) Column #
Create a column of bool values indicating whether each row in the lists column contains a null value.
- Parameters:
- inputColumn
The input column.
- Returns:
- Column
A new Column of bools indicating if the list column contains a null value.
- cudf._lib.pylibcudf.lists.count_elements(Column input) Column #
Count the number of rows in each list element in the given lists column. For details, see
count_elements()
.- Parameters:
- inputColumn
The input column
- Returns:
- Column
A new Column of the lengths of each list element
- cudf._lib.pylibcudf.lists.difference_distinct(Column lhs, Column rhs, bool nulls_equal=True, bool nans_equal=True) Column #
Create a column of index values indicating the position of a search key row within the corresponding list row in the lists column.
For details, see
difference_distinct()
.- Parameters:
- lhsColumn
The input lists column of elements that may be included.
- rhsColumn
The input lists column of elements to exclude.
- nulls_equalbool, default True
If true, null elements are considered equal. Otherwise, unequal.
- nans_equalbool, default True
If true, libcudf will treat nan elements from {-nan, +nan} as equal. Otherwise, unequal. Otherwise, unequal.
- Returns:
- Column
A lists column containing the difference results.
- cudf._lib.pylibcudf.lists.distinct(Column input, bool nulls_equal, bool nans_equal) Column #
Create a new list column without duplicate elements in each list.
For details, see
distinct()
.- Parameters:
- inputColumn
The input column.
- nulls_equalbool
If true, null elements are considered equal. Otherwise, unequal.
- nans_equalbool
If true, libcudf will treat nan elements from {-nan, +nan} as equal. Otherwise, unequal. Otherwise, unequal.
- Returns:
- Column
A new list column without duplicate elements in each list.
- cudf._lib.pylibcudf.lists.explode_outer(Table input, size_type explode_column_idx) Table #
Explode a column of lists into rows.
All other columns will be duplicated for each element in the list.
- Parameters:
- inputTable
The input table
- explode_column_idxint
The index of the column to explode
- Returns:
- Table
A new table with the exploded column
- cudf._lib.pylibcudf.lists.extract_list_element(signatures, args, kwargs, defaults, _fused_sigindex={})#
Create a column of extracted list elements.
- Parameters:
- inputColumn
The input column.
- indexUnion[Column, size_type]
The selection index or indices.
- Returns:
- Column
A new Column with elements extracted.
- cudf._lib.pylibcudf.lists.have_overlap(Column lhs, Column rhs, bool nulls_equal=True, bool nans_equal=True) Column #
Check if lists at each row of the given lists columns overlap.
For details, see
have_overlap()
.- Parameters:
- lhsColumn
The input lists column for one side.
- rhsColumn
The input lists column for the other side.
- nulls_equalbool, default True
If true, null elements are considered equal. Otherwise, unequal.
- nans_equalbool, default True
If true, libcudf will treat nan elements from {-nan, +nan} as equal. Otherwise, unequal. Otherwise, unequal.
- Returns:
- Column
A column containing the check results.
- cudf._lib.pylibcudf.lists.index_of(signatures, args, kwargs, defaults, _fused_sigindex={})#
Create a column of index values indicating the position of a search key row within the corresponding list row in the lists column.
search_key
may be aColumn
or aScalar
.For details, see
index_of()
.- Parameters:
- inputColumn
The input column.
- search_keyUnion[Column, Scalar]
The search key.
- find_first_optionbool
If true, index_of returns the first match. Otherwise the last match is returned.
- Returns:
- Column
A new Column of index values that indicate where in the list column tthe search_key was found. An index value of -1 indicates that the search_key was not found.
- cudf._lib.pylibcudf.lists.intersect_distinct(Column lhs, Column rhs, bool nulls_equal=True, bool nans_equal=True) Column #
Create a lists column of distinct elements common to two input lists columns.
For details, see
intersect_distinct()
.- Parameters:
- lhsColumn
The input lists column of elements that may be included.
- rhsColumn
The input lists column of elements to exclude.
- nulls_equalbool, default True
If true, null elements are considered equal. Otherwise, unequal.
- nans_equalbool, default True
If true, libcudf will treat nan elements from {-nan, +nan} as equal. Otherwise, unequal. Otherwise, unequal.
- Returns:
- Column
A lists column containing the intersection results.
- cudf._lib.pylibcudf.lists.reverse(Column input) Column #
Reverse the element order within each list of the input column.
For details, see
reverse()
.- Parameters:
- inputColumn
The input column.
- Returns:
- Column
A new Column with reversed lists.
- cudf._lib.pylibcudf.lists.segmented_gather(Column input, Column gather_map_list) Column #
Create a column with elements gathered based on the indices in gather_map_list
For details, see
segmented_gather()
.- Parameters:
- inputColumn
The input column.
- gather_map_listColumn
The indices of the lists column to gather.
- Returns:
- Column
A new Column with elements in list of rows gathered based on gather_map_list
- cudf._lib.pylibcudf.lists.sequences(Column starts, Column sizes, Column steps=None) Column #
Create a lists column in which each row contains a sequence of values specified by a tuple of (start, step, size) parameters.
For details, see
sequences()
.- Parameters:
- startsColumn
First values in the result sequences.
- sizesColumn
Numbers of values in the result sequences.
- stepsOptional[Column]
Increment values for the result sequences.
- Returns:
- Column
The result column containing generated sequences.
- cudf._lib.pylibcudf.lists.sort_lists(Column input, bool ascending, null_order na_position, bool stable=False) Column #
Sort the elements within a list in each row of a list column.
For details, see
sort_lists()
.- Parameters:
- inputColumn
The input column.
- ascendingbool
If true, the sort order is ascending. Otherwise, the sort order is descending.
- na_positionNullOrder
If na_position equals NullOrder.FIRST, then the null values in the output column are placed first. Otherwise, they are be placed after.
- stable: bool
If true
stable_sort_lists()
is used, Otherwise,sort_lists()
is used.
- Returns:
- Column
A new Column with elements in each list sorted.
- cudf._lib.pylibcudf.lists.union_distinct(Column lhs, Column rhs, bool nulls_equal=True, bool nans_equal=True) Column #
Create a lists column of distinct elements found in either of two input lists columns.
For details, see
union_distinct()
.- Parameters:
- lhsColumn
The input lists column of elements that may be included.
- rhsColumn
The input lists column of elements to exclude.
- nulls_equalbool, default True
If true, null elements are considered equal. Otherwise, unequal.
- nans_equalbool, default True
If true, libcudf will treat nan elements from {-nan, +nan} as equal. Otherwise, unequal. Otherwise, unequal.
- Returns:
- Column
A lists column containing the union results.