Skip to content

Commit 41c24f0

Browse files
committed
update whatsnew
1 parent 260aba2 commit 41c24f0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

doc/source/whatsnew/v0.24.1.rst

+10-4
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,20 @@ The default *behavior*, however, remains the same: the result is sorted, unless
3030
2. ``self`` or ``other`` is empty
3131
3. ``self`` or ``other`` contain values that can not be compared (a ``RuntimeWarning`` is raised).
3232

33-
This change will allow to preserve ``sort=True`` to mean "always sort" in a future release.
33+
This change will allow ``sort=True`` to mean "always sort" in a future release.
3434

3535
The same change applies to :meth:`Index.difference` and :meth:`Index.symmetric_difference`, which
3636
would do not sort the result when the values could not be compared.
3737

38-
For :meth:`Index.intersection` the option of ``sort=True`` is also renamed
39-
to ``sort=None`` (but for :meth:`Index.intersection` it is not the default), as
40-
the result is not sorted when ``self`` and ``other`` were identical.
38+
The `sort` option for :meth:`Index.intersection` has changed in three ways.
39+
40+
1. The default has changed from ``True`` to ``False``, to restore the
41+
pandas 0.23.4 and earlier behavior of not sorting by default.
42+
2. The behavior of ``sort=True`` can now be obtained with ``sort=None``.
43+
This will sort the result only if the values in ``self`` and ``other``
44+
are not identical.
45+
3. The value ``sort=True`` is no longer allowed. A future version of pandas
46+
will properly support ``sort=True`` meaning "always sort".
4147

4248
.. _whatsnew_0241.regressions:
4349

0 commit comments

Comments
 (0)