polars.Series.arg_unique#

Series.arg_unique() Series[source]#

Get unique index as Series.

Returns:
Series

Examples

>>> s = pl.Series("a", [1, 2, 2, 3])
>>> s.arg_unique()
shape: (3,)
Series: 'a' [u32]
[
        0
        1
        3
]