From 7781b131601055b57c3d41e7d487410d713b1b7b Mon Sep 17 00:00:00 2001 From: Brock Date: Fri, 28 Oct 2022 16:25:32 -0700 Subject: [PATCH] DEPR: core.index file --- doc/source/whatsnew/v2.0.0.rst | 1 + pandas/core/index.py | 37 ---------------------------------- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 pandas/core/index.py diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 819f4e28e4b83..e059fda693bf6 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -156,6 +156,7 @@ Deprecations Removal of prior version deprecations/changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Removed deprecated module ``pandas.core.index`` (:issue:`30193`) - Removed deprecated :meth:`Categorical.to_dense`, use ``np.asarray(cat)`` instead (:issue:`32639`) - Removed deprecated :meth:`Categorical.take_nd` (:issue:`27745`) - Removed deprecated :meth:`Categorical.mode`, use ``Series(cat).mode()`` instead (:issue:`45033`) diff --git a/pandas/core/index.py b/pandas/core/index.py deleted file mode 100644 index 19e9c6b27e4e7..0000000000000 --- a/pandas/core/index.py +++ /dev/null @@ -1,37 +0,0 @@ -# pyright: reportUnusedImport = false -from __future__ import annotations - -import warnings - -from pandas.util._exceptions import find_stack_level - -from pandas.core.indexes.api import ( # noqa:F401 - CategoricalIndex, - DatetimeIndex, - Float64Index, - Index, - Int64Index, - IntervalIndex, - MultiIndex, - NaT, - NumericIndex, - PeriodIndex, - RangeIndex, - TimedeltaIndex, - UInt64Index, - _new_Index, - ensure_index, - ensure_index_from_sequences, - get_objs_combined_axis, -) -from pandas.core.indexes.multi import sparsify_labels # noqa:F401 - -# GH#30193 -warnings.warn( - "pandas.core.index is deprecated and will be removed in a future version. " - "The public classes are available in the top-level namespace.", - FutureWarning, - stacklevel=find_stack_level(), -) - -__all__: list[str] = []