polars.Series.is_duplicated#

Series.is_duplicated() Series[source]#

Get mask of all duplicated values.

Returns:
Series

Series of data type Boolean.

Examples

>>> s = pl.Series("a", [1, 2, 2, 3])
>>> s.is_duplicated()
shape: (4,)
Series: 'a' [bool]
[
        false
        true
        true
        false
]