Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.20.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
5 changes: 2 additions & 3 deletions pandas/core/dtypes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
6 changes: 3 additions & 3 deletions pandas/tests/api/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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)
Expand Down