pandas.api.extensions.ExtensionDtype.is_dtype¶
-
classmethod
ExtensionDtype.is_dtype(dtype) → bool[source]¶ Check if we match ‘dtype’.
Parameters: - dtype : object
The object to check.
Returns: - is_dtype : bool
Notes
The default implementation is True if
cls.construct_from_string(dtype)is an instance ofcls.dtypeis an object and is an instance ofclsdtypehas adtypeattribute, and any of the above conditions is true fordtype.dtype.