Skip to content

Commit acefd75

Browse files
committed
DOC: whatsnew link v0.18.0 for float_indexers
Author: Jeff Reback <[email protected]> Closes #12324 from jreback/doc3 and squashes the following commits: 11d8f7b [Jeff Reback] DOC: whatsnew link v0.18.0 for float_indexers
1 parent a2ca9f3 commit acefd75

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

doc/source/whatsnew/v0.18.0.txt

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Highlights include:
2121
- API breaking change to the ``.resample`` method to make it more ``.groupby``
2222
like, see :ref:`here <whatsnew_0180.breaking.resample>`.
2323
- Removal of support for positional indexing with floats, which was deprecated
24-
since 0.14.0. This will now raise a ``TypeError``, see :ref:`here <whatsnew_0180.enhancements.float_indexers>`.
24+
since 0.14.0. This will now raise a ``TypeError``, see :ref:`here <whatsnew_0180.float_indexers>`.
2525
- The ``.to_xarray()`` function has been added for compatibility with the
2626
`xarray package <http://xarray.pydata.org/en/stable/>`__, see :ref:`here <whatsnew_0180.enhancements.xarray>`.
2727
- Addition of the :ref:`.str.extractall() method <whatsnew_0180.enhancements.extract>`,
@@ -327,11 +327,8 @@ In addition, ``.round()``, ``.floor()`` and ``.ceil()`` will be available thru t
327327
Formatting of integer in FloatIndex
328328
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
329329

330-
Integers in ``FloatIndex``, e.g. 1., are now formatted with a decimal point
331-
and a ``0`` digit, e.g. ``1.0`` (:issue:`11713`)
332-
333-
This change affects the display in jupyter, but also the output of IO methods
334-
like ``.to_csv`` or ``.to_html``
330+
Integers in ``FloatIndex``, e.g. 1., are now formatted with a decimal point and a ``0`` digit, e.g. ``1.0`` (:issue:`11713`)
331+
This change not only affects the display in a jupyter notebook, but also the output of IO methods like ``.to_csv`` or ``.to_html``
335332

336333
Previous Behavior:
337334

@@ -887,7 +884,7 @@ In 0.18.0, this deprecation warning is removed and these will now raise a ``Type
887884

888885
Previous Behavior:
889886

890-
.. code-block::
887+
.. code-block:: python
891888

892889
In [1]: s = Series([1,2,3])
893890
In [2]: s[1.0]
@@ -904,7 +901,7 @@ Previous Behavior:
904901

905902
New Behavior:
906903

907-
.. code-block::
904+
.. code-block:: python
908905

909906
In [4]: s[1.0]
910907
TypeError: cannot do label indexing on <class 'pandas.indexes.range.RangeIndex'> with these indexers [1.0] of <type 'float'>
@@ -915,6 +912,14 @@ New Behavior:
915912
In [4]: s.loc[1.0]
916913
TypeError: cannot do label indexing on <class 'pandas.indexes.range.RangeIndex'> with these indexers [1.0] of <type 'float'>
917914

915+
Float indexing on a ``Float64Index`` is unchanged.
916+
917+
.. ipython:: python
918+
919+
s = Series([1,2,3],index=np.arange(3.))
920+
s[1.0]
921+
s[1.0:2.5]
922+
918923
.. _whatsnew_0180.prior_deprecations:
919924

920925
Removal of prior version deprecations/changes

0 commit comments

Comments
 (0)