Skip to content

Commit 60d16df

Browse files
committed
remove version numbers
1 parent cd817a0 commit 60d16df

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

doc/source/user_guide/advanced.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -854,9 +854,9 @@ Int64Index and RangeIndex
854854
.. deprecated:: 1.4.0
855855
In pandas 2.0, :class:`NumericIndex` will become the default index type for numeric types
856856
instead of ``Int64Index``, ``Float64Index`` and ``UInt64Index`` and those index types
857-
are therefore deprecated and will be removed in Pandas 2.0.
857+
are therefore deprecated and will be removed in a futire version.
858858
See :ref:`here <advanced.numericindex>` for more.
859-
``RangeIndex`` however, will not be removed, as it represents an optimized version of an integer index.
859+
``RangeIndex`` will not be removed, as it represents an optimized version of an integer index.
860860

861861
:class:`Int64Index` is a fundamental basic index in pandas. This is an immutable array
862862
implementing an ordered, sliceable set.
@@ -870,11 +870,11 @@ Float64Index
870870
~~~~~~~~~~~~
871871

872872
.. deprecated:: 1.4.0
873-
In pandas 2.0, :class:`NumericIndex` will become the default index type for numeric types
873+
:class:`NumericIndex` will become the default index type for numeric types in the future
874874
instead of ``Int64Index``, ``Float64Index`` and ``UInt64Index`` and those index types
875-
are therefore deprecated and will be removed in Pandas 2.0.
875+
are therefore deprecated and will be removed in a future version of Pandas.
876876
See :ref:`here <advanced.numericindex>` for more.
877-
``RangeIndex`` however, will not be removed, as it represents an optimized version of an integer index.
877+
``RangeIndex`` will not be removed as it represents an optimized version of an integer index.
878878

879879
By default a :class:`Float64Index` will be automatically created when passing floating, or mixed-integer-floating values in index creation.
880880
This enables a pure label-based slicing paradigm that makes ``[],ix,loc`` for scalar indexing and slicing work exactly the
@@ -982,8 +982,8 @@ NumericIndex
982982

983983
In pandas 2.0, :class:`NumericIndex` will become the default index type for numeric types
984984
instead of :class:`Int64Index`, :class:`Float64Index` and :class:`UInt64Index` and those index types
985-
are therefore deprecated and will be removed in Pandas 2.0.
986-
:class:`RangeIndex` however, will not be removed, as it represents an optimized version of an integer index.
985+
are therefore deprecated and will be removed in a futureversion.
986+
:class:`RangeIndex` will not be removed as it represents an optimized version of an integer index.
987987

988988
:class:`NumericIndex` is an index type that can hold data of any numpy int/uint/float dtype. For example:
989989

@@ -998,7 +998,7 @@ NumericIndex
998998
``UInt64Index`` except that it can hold any numpy int, uint or float dtype.
999999

10001000
Until Pandas 2.0, you will have to call ``NumericIndex`` explicitly in order to use it, like in the example above.
1001-
In Pandas 2.0, ``NumericIndex`` will become the default pandas numeric index type and will automatically be used where appropriate.
1001+
In the future, ``NumericIndex`` will become the default pandas numeric index type and will automatically be used where appropriate.
10021002

10031003
Please notice that ``NumericIndex`` *can not* hold Pandas numeric dtypes (:class:`Int64Dtype`, :class:`Int32Dtype` etc.).
10041004

doc/source/whatsnew/v1.4.0.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ It is now possible to create an index of any numpy int/uint/float dtype using th
2929
pd.NumericIndex([1, 2, 3], dtype="uint32")
3030
pd.NumericIndex([1, 2, 3], dtype="float32")
3131
32-
In order to maintain backwards compatibility, calls to the base :class:`Index` will in
33-
pandas 1.x. return :class:`Int64Index`, :class:`UInt64Index` and :class:`Float64Index`, where relevant.
32+
In order to maintain backwards compatibility, calls to the base :class:`Index` will currently
33+
return :class:`Int64Index`, :class:`UInt64Index` and :class:`Float64Index`, where relevant.
3434
For example, the code below returns an ``Int64Index`` with dtype ``int64``:
3535

3636
.. code-block:: ipython
3737
3838
In [1]: pd.Index([1, 2, 3], dtype="int8")
3939
Int64Index([1, 2, 3], dtype='int64')
4040
41-
but will in Pandas 2.0 return a :class:`NumericIndex` with dtype ``int8``.
41+
but will in a future version return a :class:`NumericIndex` with dtype ``int8``.
4242

43-
More generally, for the duration of Pandas 1.x, all operations that until now have
43+
More generally, currently, all operations that until now have
4444
returned :class:`Int64Index`, :class:`UInt64Index` and :class:`Float64Index` will
45-
continue to so. This means, that in order to use ``NumericIndex`` in Pandas 1.x, you
45+
continue to so. This means, that in order to use ``NumericIndex`` in the current version, you
4646
will have to call ``NumericIndex`` explicitly. For example the below series will have an ``Int64Index``:
4747

4848
.. code-block:: ipython
@@ -51,17 +51,17 @@ will have to call ``NumericIndex`` explicitly. For example the below series will
5151
In [3]: ser.index
5252
Int64Index([1, 2, 3], dtype='int64')
5353
54-
Instead, if you want to use a ``NumericIndex`` in Pandas 1.x, you should do:
54+
Instead, if you want to use a ``NumericIndex``, you should do:
5555

5656
.. ipython:: python
5757
5858
idx = pd.NumericIndex([1, 2, 3], dtype="int8")
5959
ser = pd.Series([1, 2, 3], index=idx)
6060
ser.index
6161
62-
In Pandas 2.0, :class:`NumericIndex` will become the default numeric index type and
62+
In a future version of Pandas, :class:`NumericIndex` will become the default numeric index type and
6363
``Int64Index``, ``UInt64Index`` and ``Float64Index`` are therefore deprecated and will
64-
be removed in pandas 2.0, see :ref:`here <whatsnew_140.deprecations.int64_uint64_float64index>` for more.
64+
be removed in the future, see :ref:`here <whatsnew_140.deprecations.int64_uint64_float64index>` for more.
6565

6666
See :ref:`here <advanced.numericindex>` for more about :class:`NumericIndex`.
6767

@@ -209,9 +209,9 @@ Deprecated Int64Index, UInt64Index & Float64Index
209209
:class:`Int64Index`, :class:`UInt64Index` and :class:`Float64Index` have been deprecated
210210
in favor of the new :class:`NumericIndex` and will be removed in Pandas 2.0 (:issue:`43028`).
211211

212-
For the duration of Pandas 1.x, in order to maintain backward compatibility, calls to
212+
Currently, in order to maintain backward compatibility, calls to
213213
:class:`Index` will continue to return :class:`Int64Index`, :class:`UInt64Index` and :class:`Float64Index`
214-
when given numeric data, but in Pandas 2.0, a :class:`NumericIndex` will be returned.
214+
when given numeric data, but in the future, a :class:`NumericIndex` will be returned.
215215

216216
*Current behavior*:
217217

pandas/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@
187187

188188

189189
def __dir__():
190+
# GH43028
191+
# Int64Index etc. are deprecated, but we still want them to be available in the dir.
192+
# Remove in Pandas 2.0, when we remove Int64Index etc. from the code base.
190193
return list(globals().keys()) + __deprecated_num_index_names
191194

192195

0 commit comments

Comments
 (0)