cudf.core.column.lists.ListMethods.unique#
- ListMethods.unique() Union[Series, GenericIndex] #
Returns the unique elements in each list. The ordering of elements is not guaranteed.
- Returns
- Series or Index
Examples
>>> s = cudf.Series([[1, 1, 2, None, None], None, [4, 4], []]) >>> s 0 [1.0, 1.0, 2.0, nan, nan] 1 None 2 [4.0, 4.0] 3 [] dtype: list >>> s.list.unique() # Order of list element is not guaranteed 0 [1.0, 2.0, nan] 1 None 2 [4.0] 3 [] dtype: list