polars.Series.is_last_distinct
-
Return a boolean mask indicating the last occurrence of each distinct value.
- Returns:
-
- Series
-
Series of data type
Boolean.
Examples
>>> s = pl.Series([1, 1, 2, 3, 2]) >>> s.is_last_distinct() shape: (5,) Series: '' [bool] [ false true false true true ]
Series.is_last_distinct() → Series
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.is_last_distinct.html