We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e791330 commit db8900cCopy full SHA for db8900c
pandas/core/dtypes/common.py
@@ -1450,10 +1450,11 @@ def is_extension_array_dtype(arr_or_dtype) -> bool:
1450
elif isinstance(dtype, np.dtype):
1451
return False
1452
else:
1453
- # TODO ugly -> move into registry find()? Or make this work with pandas_dtype?
1454
- if dtype is str and using_string_dtype():
1455
- return True
1456
- return registry.find(dtype) is not None
+ try:
+ dtype = pandas_dtype(dtype)
+ except TypeError:
+ return False
1457
+ return isinstance(dtype, ExtensionDtype)
1458
1459
1460
def is_ea_or_datetimelike_dtype(dtype: DtypeObj | None) -> bool:
0 commit comments