pandas.api.extensions.ExtensionDtype.is_dtype#

classmethod ExtensionDtype.is_dtype(dtype)[源代码]#

检查我们是否匹配‘dtype’。

参数
dtype对象

要检查的对象。

退货
布尔尔

注意事项

如果满足以下条件,则默认实现为True

  1. cls.construct_from_string(dtype) 是一个实例,它是 cls

  2. dtype is an object and is an instance of cls

  3. dtype 有一个 dtype 属性,并且上述任何条件都适用于 dtype.dtype