polars.Series.all#
- Series.all(*, ignore_nulls: bool = True) bool | None [source]#
Return whether all values in the column are
True
.Only works on columns of data type
Boolean
.- Parameters:
- ignore_nulls
Ignore null values (default).
If set to
False
, Kleene logic is used to deal with nulls: if the column contains any null values and noFalse
values, the output isNone
.
- Returns:
- bool or None
Examples
>>> pl.Series([True, True]).all() True >>> pl.Series([False, True]).all() False >>> pl.Series([None, True]).all() True
Enable Kleene logic by setting
ignore_nulls=False
.>>> pl.Series([None, True]).all(ignore_nulls=False) # Returns None