pandas.api.types.is_bool#

pandas.api.types.is_bool(obj)#

Return True if given object is boolean.

Parameters:
objobject

Object to check.

Returns:
bool

See also

api.types.is_scalar

Check if the input is a scalar.

api.types.is_integer

Check if the input is an integer.

api.types.is_float

Check if the input is a float.

Examples

>>> pd.api.types.is_bool(True)
True
>>> pd.api.types.is_bool(1)
False