Spec-Zone.ru › Polars

polars.Series.is_empty

Series.is_empty(
    *,
    ignore_nulls: bool = False,
) → bool

Check if the Series is empty.

Parameters:
ignore_nulls

If true a series containing only nulls will also be considered empty. The default is false.

Warning

This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.

Examples

>>> s = pl.Series("a", [], dtype=pl.Float32)
>>> s.is_empty()
True
>>> s = pl.Series("a", [None], dtype=pl.Float32)
>>> s.is_empty()
False
>>> s.is_empty(ignore_nulls=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_empty.html

Spec-Zone.ru

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