polars.Series.unique
-
Get unique elements in series.
nullis considered to be a unique value for the purposes of this operation.- Parameters:
-
- maintain_order
-
Maintain order of data. This requires more work.
Examples
>>> s = pl.Series("a", [1, 2, 2, 3]) >>> s.unique().sort() shape: (3,) Series: 'a' [i64] [ 1 2 3 ]
Series.unique(
*,
maintain_order: bool = False,
) → Series
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.unique.html