Spec-Zone.ru › Polars

polars.Series.is_sorted

Series.is_sorted(
    *,
    descending: bool = False,
    nulls_last: bool = False,
) → bool

Check if the Series is sorted.

Parameters:
descending

Check if the Series is sorted in descending order

nulls_last

Set nulls at the end of the Series in sorted check.

Examples

>>> s = pl.Series([1, 3, 2])
>>> s.is_sorted()
False
>>> s = pl.Series([3, 2, 1])
>>> s.is_sorted(descending=True)
True

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

Spec-Zone.ru

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