woodwork.logical_types.Boolean#
- class woodwork.logical_types.Boolean(cast_nulls_as=None)[source]#
Represents Logical Types that contain binary values indicating true/false.
- Parameters:
cast_nulls_as (bool) – If provided, null values in the column will be cast to this default bool, otherwise will raise an error if None. Defaults to None.
Examples
[True, False, True] [0, 1, 1]
Methods
__init__
([cast_nulls_as])transform
(series[, null_invalid_values])Validates Boolean values by checking for valid boolean equivalents.
validate
(series, *args, **kwargs)Validates that a logical type is consistent with the series dtype.
Attributes
primary_dtype
standard_tags
type_string