From 5591cc2021311f71edbfe8a5a145753e1045f35f Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Tue, 10 Dec 2019 15:57:05 -0800 Subject: [PATCH 1/6] DEPR: pandas.core.index --- doc/source/whatsnew/v1.0.0.rst | 4 ++-- pandas/_libs/internals.pyx | 2 +- pandas/_libs/lib.pyx | 2 +- pandas/core/api.py | 14 +++++++------- pandas/core/arrays/sparse/scipy_sparse.py | 2 +- pandas/core/construction.py | 2 +- pandas/core/frame.py | 2 +- pandas/core/generic.py | 2 +- pandas/core/groupby/groupby.py | 2 +- pandas/core/groupby/grouper.py | 2 +- pandas/core/groupby/ops.py | 2 +- pandas/core/index.py | 8 ++++++++ pandas/core/indexes/api.py | 2 -- pandas/core/indexes/base.py | 2 +- pandas/core/indexing.py | 2 +- pandas/core/internals/construction.py | 8 ++++++-- pandas/core/internals/managers.py | 2 +- pandas/core/reshape/pivot.py | 2 +- pandas/core/reshape/reshape.py | 2 +- pandas/core/series.py | 6 +++--- pandas/core/window/common.py | 2 +- pandas/core/window/rolling.py | 2 +- pandas/io/formats/format.py | 4 ++-- pandas/io/parsers.py | 7 ++++++- pandas/io/pytables.py | 2 +- pandas/plotting/_matplotlib/converter.py | 3 +-- .../tests/arrays/categorical/test_constructors.py | 3 +-- pandas/tests/indexes/test_base.py | 9 +++++++-- pandas/tests/series/test_analytics.py | 2 +- pandas/tests/series/test_repr.py | 2 +- pandas/tests/test_multilevel.py | 3 +-- 31 files changed, 63 insertions(+), 46 deletions(-) diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index 3e72072eae303..c90462918751c 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -453,7 +453,7 @@ See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for mor Other API changes ^^^^^^^^^^^^^^^^^ -- Bumpded the minimum supported version of ``s3fs`` from 0.0.8 to 0.3.0 (:issue:`28616`) +- Bumped the minimum supported version of ``s3fs`` from 0.0.8 to 0.3.0 (:issue:`28616`) - :class:`pandas.core.groupby.GroupBy.transform` now raises on invalid operation names (:issue:`27489`) - :meth:`pandas.api.types.infer_dtype` will now return "integer-na" for integer and ``np.nan`` mix (:issue:`27283`) - :meth:`MultiIndex.from_arrays` will no longer infer names from arrays if ``names=None`` is explicitly provided (:issue:`27292`) @@ -490,7 +490,7 @@ Deprecations - :func:`eval` keyword argument "truediv" is deprecated and will be removed in a future version (:issue:`29812`) - :meth:`Categorical.take_nd` is deprecated, use :meth:`Categorical.take` instead (:issue:`27745`) - The parameter ``numeric_only`` of :meth:`Categorical.min` and :meth:`Categorical.max` is deprecated and replaced with ``skipna`` (:issue:`25303`) -- +- :module:`pandas.core.index` has been deprecated and will be removed in a future version, use :module:`pandas.core.indexes.api` instead (:issue:`19711`) .. _whatsnew_1000.prior_deprecations: diff --git a/pandas/_libs/internals.pyx b/pandas/_libs/internals.pyx index 7be8b1b152fae..8bbbc6db94842 100644 --- a/pandas/_libs/internals.pyx +++ b/pandas/_libs/internals.pyx @@ -96,7 +96,7 @@ cdef class BlockPlacement: return self._as_array def isin(self, arr): - from pandas.core.index import Int64Index + from pandas.core.indexes.api import Int64Index return Int64Index(self.as_array, copy=False).isin(arr) @property diff --git a/pandas/_libs/lib.pyx b/pandas/_libs/lib.pyx index a6b02e016823c..e9a486894fbf0 100644 --- a/pandas/_libs/lib.pyx +++ b/pandas/_libs/lib.pyx @@ -598,7 +598,7 @@ def astype_str(arr: ndarray, skipna: bool=False) -> ndarray[object]: @cython.boundscheck(False) def clean_index_list(obj: list): """ - Utility used in ``pandas.core.index.ensure_index``. + Utility used in ``pandas.core.indexes.api.ensure_index``. """ cdef: Py_ssize_t i, n = len(obj) diff --git a/pandas/core/api.py b/pandas/core/api.py index bf701c0318874..5261801600111 100644 --- a/pandas/core/api.py +++ b/pandas/core/api.py @@ -2,6 +2,9 @@ import numpy as np +from pandas._libs import NaT, Period, Timedelta, Timestamp +from pandas._libs.missing import NA + from pandas.core.dtypes.dtypes import ( CategoricalDtype, DatetimeTZDtype, @@ -26,7 +29,7 @@ from pandas.core.arrays.string_ import StringDtype from pandas.core.construction import array from pandas.core.groupby import Grouper, NamedAgg -from pandas.core.index import ( +from pandas.core.indexes.api import ( CategoricalIndex, DatetimeIndex, Float64Index, @@ -34,16 +37,15 @@ Int64Index, IntervalIndex, MultiIndex, - NaT, PeriodIndex, RangeIndex, TimedeltaIndex, UInt64Index, ) -from pandas.core.indexes.datetimes import Timestamp, bdate_range, date_range +from pandas.core.indexes.datetimes import bdate_range, date_range from pandas.core.indexes.interval import Interval, interval_range -from pandas.core.indexes.period import Period, period_range -from pandas.core.indexes.timedeltas import Timedelta, timedelta_range +from pandas.core.indexes.period import period_range +from pandas.core.indexes.timedeltas import timedelta_range from pandas.core.indexing import IndexSlice from pandas.core.series import Series from pandas.core.tools.datetimes import to_datetime @@ -55,5 +57,3 @@ # DataFrame needs to be imported after NamedAgg to avoid a circular import from pandas.core.frame import DataFrame # isort:skip - -from pandas._libs.missing import NA diff --git a/pandas/core/arrays/sparse/scipy_sparse.py b/pandas/core/arrays/sparse/scipy_sparse.py index f244055b05cd4..278ad1027d489 100644 --- a/pandas/core/arrays/sparse/scipy_sparse.py +++ b/pandas/core/arrays/sparse/scipy_sparse.py @@ -5,7 +5,7 @@ """ from collections import OrderedDict -from pandas.core.index import Index, MultiIndex +from pandas.core.indexes.api import Index, MultiIndex from pandas.core.series import Series diff --git a/pandas/core/construction.py b/pandas/core/construction.py index c7dec9e1234d2..988f184937067 100644 --- a/pandas/core/construction.py +++ b/pandas/core/construction.py @@ -49,7 +49,7 @@ if TYPE_CHECKING: from pandas.core.series import Series # noqa: F401 - from pandas.core.index import Index # noqa: F401 + from pandas.core.indexes.api import Index # noqa: F401 def array( diff --git a/pandas/core/frame.py b/pandas/core/frame.py index b8d86d9e295fe..ee1c4b756e441 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -93,8 +93,8 @@ from pandas.core.arrays.datetimelike import DatetimeLikeArrayMixin as DatetimeLikeArray from pandas.core.arrays.sparse import SparseFrameAccessor from pandas.core.generic import NDFrame, _shared_docs -from pandas.core.index import Index, ensure_index, ensure_index_from_sequences from pandas.core.indexes import base as ibase +from pandas.core.indexes.api import Index, ensure_index, ensure_index_from_sequences from pandas.core.indexes.datetimes import DatetimeIndex from pandas.core.indexes.multi import maybe_droplevels from pandas.core.indexes.period import PeriodIndex diff --git a/pandas/core/generic.py b/pandas/core/generic.py index f88f37fac7157..3353de171293c 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -73,7 +73,7 @@ from pandas.core.base import PandasObject, SelectionMixin import pandas.core.common as com from pandas.core.construction import create_series_with_explicit_dtype -from pandas.core.index import ( +from pandas.core.indexes.api import ( Index, InvalidIndexError, MultiIndex, diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 589e59429fee1..609ae425658c3 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -59,7 +59,7 @@ class providing the base-class of operations. from pandas.core.frame import DataFrame from pandas.core.generic import NDFrame from pandas.core.groupby import base, ops -from pandas.core.index import CategoricalIndex, Index, MultiIndex +from pandas.core.indexes.api import CategoricalIndex, Index, MultiIndex from pandas.core.series import Series from pandas.core.sorting import get_group_index_sorter diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py index b0df04f18ff1d..8e0ace3b77c19 100644 --- a/pandas/core/groupby/grouper.py +++ b/pandas/core/groupby/grouper.py @@ -26,7 +26,7 @@ from pandas.core.frame import DataFrame from pandas.core.groupby import ops from pandas.core.groupby.categorical import recode_for_groupby, recode_from_groupby -from pandas.core.index import CategoricalIndex, Index, MultiIndex +from pandas.core.indexes.api import CategoricalIndex, Index, MultiIndex from pandas.core.series import Series from pandas.io.formats.printing import pprint_thing diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py index 4780254e060e6..fa8e4985090a7 100644 --- a/pandas/core/groupby/ops.py +++ b/pandas/core/groupby/ops.py @@ -43,7 +43,7 @@ from pandas.core.frame import DataFrame from pandas.core.generic import NDFrame from pandas.core.groupby import base, grouper -from pandas.core.index import Index, MultiIndex, ensure_index +from pandas.core.indexes.api import Index, MultiIndex, ensure_index from pandas.core.series import Series from pandas.core.sorting import ( compress_group_index, diff --git a/pandas/core/index.py b/pandas/core/index.py index 84b37b8bd659d..d6bcd276b9792 100644 --- a/pandas/core/index.py +++ b/pandas/core/index.py @@ -1,3 +1,5 @@ +import warnings + from pandas.core.indexes.api import ( # noqa:F401 CategoricalIndex, DatetimeIndex, @@ -19,3 +21,9 @@ get_objs_combined_axis, ) from pandas.core.indexes.multi import _sparsify # noqa:F401 + +warnings.warn( + "pandas.core.index is deprecated and will be removed in a future version. " + "Use pandas.core.indexes.api instead.", + FutureWarning, +) diff --git a/pandas/core/indexes/api.py b/pandas/core/indexes/api.py index c3de1321404b4..e99ae96f35315 100644 --- a/pandas/core/indexes/api.py +++ b/pandas/core/indexes/api.py @@ -37,8 +37,6 @@ ) -# TODO: there are many places that rely on these private methods existing in -# pandas.core.index __all__ = [ "Index", "MultiIndex", diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 1587d97ffb52c..2183717ba19c7 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -5474,6 +5474,6 @@ def _validate_join_method(method): def default_index(n): - from pandas.core.index import RangeIndex + from pandas.core.indexes.range import RangeIndex return RangeIndex(0, n, name=None) diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index a9269a5e0efa1..0b9f49368b3d3 100755 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -26,8 +26,8 @@ from pandas.core.dtypes.missing import _infer_fill_value, isna import pandas.core.common as com -from pandas.core.index import Index, InvalidIndexError from pandas.core.indexers import is_list_like_indexer, length_of_indexer +from pandas.core.indexes.api import Index, InvalidIndexError # the supported indexers diff --git a/pandas/core/internals/construction.py b/pandas/core/internals/construction.py index fe4f7f03c65ef..ae1f37aa5cd45 100644 --- a/pandas/core/internals/construction.py +++ b/pandas/core/internals/construction.py @@ -37,9 +37,13 @@ from pandas.core import algorithms, common as com from pandas.core.arrays import Categorical from pandas.core.construction import sanitize_array -from pandas.core.index import Index, ensure_index, get_objs_combined_axis from pandas.core.indexes import base as ibase -from pandas.core.indexes.api import union_indexes +from pandas.core.indexes.api import ( + Index, + ensure_index, + get_objs_combined_axis, + union_indexes, +) from pandas.core.internals import ( create_block_manager_from_arrays, create_block_manager_from_blocks, diff --git a/pandas/core/internals/managers.py b/pandas/core/internals/managers.py index f312b88d9a0bc..8e05162ed21d0 100644 --- a/pandas/core/internals/managers.py +++ b/pandas/core/internals/managers.py @@ -32,8 +32,8 @@ import pandas.core.algorithms as algos from pandas.core.base import PandasObject -from pandas.core.index import Index, MultiIndex, ensure_index from pandas.core.indexers import maybe_convert_indices +from pandas.core.indexes.api import Index, MultiIndex, ensure_index from pandas.io.formats.printing import pprint_thing diff --git a/pandas/core/reshape/pivot.py b/pandas/core/reshape/pivot.py index 27d6a28a33cc6..4b21045cd0217 100644 --- a/pandas/core/reshape/pivot.py +++ b/pandas/core/reshape/pivot.py @@ -11,7 +11,7 @@ import pandas.core.common as com from pandas.core.frame import _shared_docs from pandas.core.groupby import Grouper -from pandas.core.index import Index, MultiIndex, get_objs_combined_axis +from pandas.core.indexes.api import Index, MultiIndex, get_objs_combined_axis from pandas.core.reshape.concat import concat from pandas.core.reshape.util import cartesian_product from pandas.core.series import Series diff --git a/pandas/core/reshape/reshape.py b/pandas/core/reshape/reshape.py index a8dcc995e48da..a968e183102ab 100644 --- a/pandas/core/reshape/reshape.py +++ b/pandas/core/reshape/reshape.py @@ -25,7 +25,7 @@ from pandas.core.arrays.categorical import factorize_from_iterable from pandas.core.construction import extract_array from pandas.core.frame import DataFrame -from pandas.core.index import Index, MultiIndex +from pandas.core.indexes.api import Index, MultiIndex from pandas.core.series import Series from pandas.core.sorting import ( compress_group_index, diff --git a/pandas/core/series.py b/pandas/core/series.py index 3eabb70581827..54c163330e6ee 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -59,15 +59,15 @@ is_empty_data, sanitize_array, ) -from pandas.core.index import ( +from pandas.core.indexers import maybe_convert_indices +from pandas.core.indexes.accessors import CombinedDatetimelikeProperties +from pandas.core.indexes.api import ( Float64Index, Index, InvalidIndexError, MultiIndex, ensure_index, ) -from pandas.core.indexers import maybe_convert_indices -from pandas.core.indexes.accessors import CombinedDatetimelikeProperties import pandas.core.indexes.base as ibase from pandas.core.indexes.datetimes import DatetimeIndex from pandas.core.indexes.period import PeriodIndex diff --git a/pandas/core/window/common.py b/pandas/core/window/common.py index 9f377c180a263..c7d856e9a1e88 100644 --- a/pandas/core/window/common.py +++ b/pandas/core/window/common.py @@ -11,7 +11,7 @@ import pandas.core.common as com from pandas.core.generic import _shared_docs from pandas.core.groupby.base import GroupByMixin -from pandas.core.index import MultiIndex +from pandas.core.indexes.api import MultiIndex _shared_docs = dict(**_shared_docs) _doc_template = """ diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 937da86e4df40..c684acdbf917c 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -38,7 +38,7 @@ from pandas._typing import Axis, FrameOrSeries, Scalar from pandas.core.base import DataError, PandasObject, SelectionMixin, ShallowMixin import pandas.core.common as com -from pandas.core.index import Index, ensure_index +from pandas.core.indexes.api import Index, ensure_index from pandas.core.window.common import ( WindowGroupByMixin, _doc_template, diff --git a/pandas/io/formats/format.py b/pandas/io/formats/format.py index dab1cd243a343..109df6584641d 100644 --- a/pandas/io/formats/format.py +++ b/pandas/io/formats/format.py @@ -68,7 +68,7 @@ from pandas.core.arrays.timedeltas import TimedeltaArray from pandas.core.base import PandasObject import pandas.core.common as com -from pandas.core.index import Index, ensure_index +from pandas.core.indexes.api import Index, ensure_index from pandas.core.indexes.datetimes import DatetimeIndex from pandas.core.indexes.timedeltas import TimedeltaIndex @@ -984,7 +984,7 @@ def to_html( ) def _get_formatted_column_labels(self, frame: "DataFrame") -> List[List[str]]: - from pandas.core.index import _sparsify + from pandas.core.indexes.multi import _sparsify columns = frame.columns diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index 2d8787d1c4874..c87edcc602686 100755 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -50,7 +50,12 @@ from pandas.core import algorithms from pandas.core.arrays import Categorical from pandas.core.frame import DataFrame -from pandas.core.index import Index, MultiIndex, RangeIndex, ensure_index_from_sequences +from pandas.core.indexes.api import ( + Index, + MultiIndex, + RangeIndex, + ensure_index_from_sequences, +) from pandas.core.series import Series from pandas.core.tools import datetimes as tools diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 6c3766b5ac816..e1514361d5d68 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -61,7 +61,7 @@ from pandas.core.arrays.categorical import Categorical import pandas.core.common as com from pandas.core.computation.pytables import PyTablesExpr, maybe_expression -from pandas.core.index import ensure_index +from pandas.core.indexes.api import ensure_index from pandas.io.common import _stringify_path from pandas.io.formats.printing import adjoin, pprint_thing diff --git a/pandas/plotting/_matplotlib/converter.py b/pandas/plotting/_matplotlib/converter.py index feb895a099da5..1bd7bec59d238 100644 --- a/pandas/plotting/_matplotlib/converter.py +++ b/pandas/plotting/_matplotlib/converter.py @@ -24,9 +24,8 @@ ) from pandas.core.dtypes.generic import ABCSeries -from pandas import get_option +from pandas import Index, get_option import pandas.core.common as com -from pandas.core.index import Index from pandas.core.indexes.datetimes import date_range from pandas.core.indexes.period import Period, PeriodIndex, period_range import pandas.core.tools.datetimes as tools diff --git a/pandas/tests/arrays/categorical/test_constructors.py b/pandas/tests/arrays/categorical/test_constructors.py index 14bb9b88eee88..0762523d53428 100644 --- a/pandas/tests/arrays/categorical/test_constructors.py +++ b/pandas/tests/arrays/categorical/test_constructors.py @@ -16,6 +16,7 @@ Index, Interval, IntervalIndex, + MultiIndex, NaT, Series, Timestamp, @@ -285,8 +286,6 @@ def test_constructor_with_generator(self): tm.assert_categorical_equal(cat, exp) # This uses xrange internally - from pandas.core.index import MultiIndex - MultiIndex.from_product([range(5), ["a", "b", "c"]]) # check that categories accept generators and sequences diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index 9cc1ab58c6de7..d4d644e486478 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -33,8 +33,13 @@ period_range, ) from pandas.core.algorithms import safe_sort -from pandas.core.index import ensure_index, ensure_index_from_sequences -from pandas.core.indexes.api import Index, MultiIndex, _get_combined_index +from pandas.core.indexes.api import ( + Index, + MultiIndex, + _get_combined_index, + ensure_index, + ensure_index_from_sequences, +) from pandas.tests.indexes.common import Base from pandas.tests.indexes.conftest import indices_dict import pandas.util.testing as tm diff --git a/pandas/tests/series/test_analytics.py b/pandas/tests/series/test_analytics.py index 9b4610e61e3d5..0eb4e8a6cfdf3 100644 --- a/pandas/tests/series/test_analytics.py +++ b/pandas/tests/series/test_analytics.py @@ -12,13 +12,13 @@ Categorical, CategoricalIndex, DataFrame, + MultiIndex, Series, date_range, isna, notna, ) from pandas.api.types import is_scalar -from pandas.core.index import MultiIndex from pandas.core.indexes.datetimes import Timestamp from pandas.core.indexes.timedeltas import TimedeltaIndex import pandas.util.testing as tm diff --git a/pandas/tests/series/test_repr.py b/pandas/tests/series/test_repr.py index b687179f176c3..008ae50e4cde5 100644 --- a/pandas/tests/series/test_repr.py +++ b/pandas/tests/series/test_repr.py @@ -8,13 +8,13 @@ Categorical, DataFrame, Index, + MultiIndex, Series, date_range, option_context, period_range, timedelta_range, ) -from pandas.core.index import MultiIndex import pandas.util.testing as tm diff --git a/pandas/tests/test_multilevel.py b/pandas/tests/test_multilevel.py index 204cdee2d9e1f..d27561f20a97e 100644 --- a/pandas/tests/test_multilevel.py +++ b/pandas/tests/test_multilevel.py @@ -12,8 +12,7 @@ from pandas.core.dtypes.common import is_float_dtype, is_integer_dtype import pandas as pd -from pandas import DataFrame, Series, Timestamp, isna -from pandas.core.index import Index, MultiIndex +from pandas import DataFrame, Index, MultiIndex, Series, Timestamp, isna import pandas.util.testing as tm AGG_FUNCTIONS = [ From c8b407c0a407fabaabdb746eb3f84955bbf28b9b Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Tue, 10 Dec 2019 16:25:48 -0800 Subject: [PATCH 2/6] update test --- pandas/tests/indexing/multiindex/test_multiindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/indexing/multiindex/test_multiindex.py b/pandas/tests/indexing/multiindex/test_multiindex.py index bf1e999b06860..8c6afef1234da 100644 --- a/pandas/tests/indexing/multiindex/test_multiindex.py +++ b/pandas/tests/indexing/multiindex/test_multiindex.py @@ -20,7 +20,7 @@ def test_multiindex_perf_warn(self): } ).set_index(["jim", "joe"]) - with tm.assert_produces_warning(PerformanceWarning, clear=[pd.core.index]): + with tm.assert_produces_warning(PerformanceWarning): df.loc[(1, "z")] df = df.iloc[[2, 1, 3, 0]] From c90feee9ce972fa0026eb00c2eba8d799644cc3e Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Tue, 10 Dec 2019 19:19:49 -0800 Subject: [PATCH 3/6] okwarning for docubild --- doc/source/user_guide/io.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index fa47a5944f7bf..b01edd27579fc 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -4750,6 +4750,7 @@ See the documentation for `pyarrow `__ an Write to a parquet file. .. ipython:: python + :okwarning: df.to_parquet('example_pa.parquet', engine='pyarrow') df.to_parquet('example_fp.parquet', engine='fastparquet') From eff0564c1bc42f1032213b7f29c30d8971612db0 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Wed, 11 Dec 2019 09:56:24 -0800 Subject: [PATCH 4/6] fixup whatsnrw --- doc/source/whatsnew/v1.0.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index ec25289473fb7..8773c2b31f3f5 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -490,7 +490,7 @@ Deprecations - :func:`eval` keyword argument "truediv" is deprecated and will be removed in a future version (:issue:`29812`) - :meth:`Categorical.take_nd` is deprecated, use :meth:`Categorical.take` instead (:issue:`27745`) - The parameter ``numeric_only`` of :meth:`Categorical.min` and :meth:`Categorical.max` is deprecated and replaced with ``skipna`` (:issue:`25303`) -- :module:`pandas.core.index` has been deprecated and will be removed in a future version, use :module:`pandas.core.indexes.api` instead (:issue:`19711`) +- ``pandas.core.index`` has been deprecated and will be removed in a future version, the public classes are available in the top-level namespace (:issue:`19711`) .. _whatsnew_1000.prior_deprecations: From 921ba0a6326f5190f9152b05af8eb01aadf413d1 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Thu, 12 Dec 2019 13:23:45 -0800 Subject: [PATCH 5/6] update warning --- pandas/core/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/index.py b/pandas/core/index.py index d6bcd276b9792..a9c8e6731a17e 100644 --- a/pandas/core/index.py +++ b/pandas/core/index.py @@ -22,8 +22,9 @@ ) from pandas.core.indexes.multi import _sparsify # noqa:F401 +# GH#30193 warnings.warn( "pandas.core.index is deprecated and will be removed in a future version. " - "Use pandas.core.indexes.api instead.", + "The public classes are available in the top-level namespace.", FutureWarning, ) From ab0dd27d95fc2b7460091db2b80c5aca52011845 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Thu, 12 Dec 2019 15:51:42 -0800 Subject: [PATCH 6/6] Add line for s3fs --- doc/source/whatsnew/v1.0.0.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index ab36d13f595a6..543412e8fe28e 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -432,6 +432,8 @@ Optional libraries below the lowest tested version may still work, but are not c +-----------------+-----------------+---------+ | pytables | 3.4.2 | | +-----------------+-----------------+---------+ +| s3fs | 0.3.0 | X | ++-----------------+-----------------+---------+ | scipy | 0.19.0 | | +-----------------+-----------------+---------+ | sqlalchemy | 1.1.4 | |