polars.Series.arg_true#

Series.arg_true() Series[source]#

Get index values where Boolean Series evaluate True.

Returns:
Series

Series of data type UInt32.

Examples

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