pandas.api.types.is_complex#

pandas.api.types.is_complex(obj)#

Return True if given object is complex.

This function checks whether obj is an instance of Python’s built-in complex type or numpy’s complex type (e.g., numpy.complex128).

Parameters:
objobject

Object to check.

Returns:
bool

See also

api.types.is_complex_dtype

Check whether the provided array or dtype is of a complex dtype.

api.types.is_number

Check if the object is a number.

api.types.is_integer

Return True if given object is integer.

Examples

>>> pd.api.types.is_complex(1 + 1j)
True
>>> pd.api.types.is_complex(1)
False