pandas.api.types.is_bool#
- pandas.api.types.is_bool(obj)#
Return True if given object is boolean.
This function checks whether
objis an instance of Python’s built-inbooltype. It does not return True for numeric values like0or1that can evaluate as booleans.- Parameters:
- objobject
Object to check.
- Returns:
- bool
See also
api.types.is_scalarCheck if the input is a scalar.
api.types.is_integerCheck if the input is an integer.
api.types.is_floatCheck if the input is a float.
Examples
>>> pd.api.types.is_bool(True) True
>>> pd.api.types.is_bool(1) False