diff --git a/doc/source/api.rst b/doc/source/api.rst index 7102258318b5b..491bec3c83f61 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -1969,15 +1969,14 @@ Dtype introspection Iterable introspection +.. autosummary:: + :toctree: generated/ + api.types.is_dict_like api.types.is_file_like api.types.is_list_like api.types.is_named_tuple api.types.is_iterator - api.types.is_sequence - -.. autosummary:: - :toctree: generated/ Scalar introspection diff --git a/doc/source/whatsnew/v0.20.0.txt b/doc/source/whatsnew/v0.20.0.txt index 6e4756c3c5245..cdad8094e8dd6 100644 --- a/doc/source/whatsnew/v0.20.0.txt +++ b/doc/source/whatsnew/v0.20.0.txt @@ -1521,7 +1521,7 @@ Other Deprecations * ``pd.match()``, is removed. * ``pd.groupby()``, replaced by using the ``.groupby()`` method directly on a ``Series/DataFrame`` * ``pd.get_store()``, replaced by a direct call to ``pd.HDFStore(...)`` -- ``is_any_int_dtype`` and ``is_floating_dtype`` are deprecated from ``pandas.api.types`` (:issue:`16042`) +- ``is_any_int_dtype``, ``is_floating_dtype``, and ``is_sequence`` are deprecated from ``pandas.api.types`` (:issue:`16042`) .. _whatsnew_0200.prior_deprecations: diff --git a/pandas/core/dtypes/api.py b/pandas/core/dtypes/api.py index 242c62125664c..a2180ecc4632f 100644 --- a/pandas/core/dtypes/api.py +++ b/pandas/core/dtypes/api.py @@ -57,14 +57,13 @@ is_file_like, is_list_like, is_hashable, - is_named_tuple, - is_sequence) + is_named_tuple) # deprecated m = sys.modules['pandas.core.dtypes.api'] -for t in ['is_any_int_dtype', 'is_floating_dtype']: +for t in ['is_any_int_dtype', 'is_floating_dtype', 'is_sequence']: def outer(t=t): diff --git a/pandas/tests/api/test_types.py b/pandas/tests/api/test_types.py index b9198c42e2eff..834857b87960c 100644 --- a/pandas/tests/api/test_types.py +++ b/pandas/tests/api/test_types.py @@ -31,9 +31,9 @@ class TestTypes(Base, tm.TestCase): 'is_re', 'is_re_compilable', 'is_dict_like', 'is_iterator', 'is_file_like', 'is_list_like', 'is_hashable', - 'is_named_tuple', 'is_sequence', + 'is_named_tuple', 'pandas_dtype', 'union_categoricals', 'infer_dtype'] - deprecated = ['is_any_int_dtype', 'is_floating_dtype'] + deprecated = ['is_any_int_dtype', 'is_floating_dtype', 'is_sequence'] dtypes = ['CategoricalDtype', 'DatetimeTZDtype', 'PeriodDtype', 'IntervalDtype'] @@ -90,7 +90,7 @@ def test_removed_from_core_common(self): def test_deprecated_from_api_types(self): - for t in ['is_any_int_dtype', 'is_floating_dtype']: + for t in self.deprecated: with tm.assert_produces_warning(FutureWarning, check_stacklevel=False): getattr(types, t)(1)