Spec-Zone.ru › Polars

polars.Series.index_of

Series.index_of(
    element: IntoExpr,
) → int | None

Get the index of the first occurrence of a value, or None if it’s not found.

Parameters:
element

Value to find.

Examples

>>> s = pl.Series("a", [1, None, 17])
>>> s.index_of(17)
2
>>> s.index_of(None)  # search for a null
1
>>> s.index_of(55) is None
True

© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.index_of.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API