diff --git a/pandas/api/types/__init__.py b/pandas/api/types/__init__.py index dcf010dcf4bc28..8bda0c75f85400 100644 --- a/pandas/api/types/__init__.py +++ b/pandas/api/types/__init__.py @@ -1,6 +1,10 @@ """ public toolkit API """ from pandas.core.dtypes.api import * # noqa +from pandas.core.dtypes.dtypes import (CategoricalDtype, # noqa + DatetimeTZDtype, + PeriodDtype, + IntervalDtype) from pandas.core.dtypes.concat import union_categoricals # noqa from pandas._libs.lib import infer_dtype # noqa del np # noqa diff --git a/pandas/tests/api/test_types.py b/pandas/tests/api/test_types.py index 3b9148a1c91c6d..6b37501045d403 100644 --- a/pandas/tests/api/test_types.py +++ b/pandas/tests/api/test_types.py @@ -33,10 +33,12 @@ class TestTypes(Base, tm.TestCase): 'is_list_like', 'is_hashable', 'is_named_tuple', 'is_sequence', 'pandas_dtype', 'union_categoricals', 'infer_dtype'] + dtypes = ['CategoricalDtype', 'DatetimeTZDtype', + 'PeriodDtype', 'IntervalDtype'] def test_types(self): - self.check(types, self.allowed) + self.check(types, self.allowed + self.dtypes) def check_deprecation(self, fold, fnew): with tm.assert_produces_warning(DeprecationWarning):