Skip to content

DOC: whatsnew link v0.18.0 for float_indexers #12324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
21 changes: 13 additions & 8 deletions doc/source/whatsnew/v0.18.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Highlights include:
- API breaking change to the ``.resample`` method to make it more ``.groupby``
like, see :ref:`here <whatsnew_0180.breaking.resample>`.
- Removal of support for positional indexing with floats, which was deprecated
since 0.14.0. This will now raise a ``TypeError``, see :ref:`here <whatsnew_0180.enhancements.float_indexers>`.
since 0.14.0. This will now raise a ``TypeError``, see :ref:`here <whatsnew_0180.float_indexers>`.
- The ``.to_xarray()`` function has been added for compatibility with the
`xarray package <http://xarray.pydata.org/en/stable/>`__, see :ref:`here <whatsnew_0180.enhancements.xarray>`.
- Addition of the :ref:`.str.extractall() method <whatsnew_0180.enhancements.extract>`,
Expand Down Expand Up @@ -327,11 +327,8 @@ In addition, ``.round()``, ``.floor()`` and ``.ceil()`` will be available thru t
Formatting of integer in FloatIndex
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Integers in ``FloatIndex``, e.g. 1., are now formatted with a decimal point
and a ``0`` digit, e.g. ``1.0`` (:issue:`11713`)

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

Previous Behavior:

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

Previous Behavior:

.. code-block::
.. code-block:: python

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

New Behavior:

.. code-block::
.. code-block:: python

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

Float indexing on a ``Float64Index`` is unchanged.

.. ipython:: python

s = Series([1,2,3],index=np.arange(3.))
s[1.0]
s[1.0:2.5]

.. _whatsnew_0180.prior_deprecations:

Removal of prior version deprecations/changes
Expand Down