You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default ``sort`` value for :meth:`Index.union` has changed from ``True`` to ``None`` (:issue:`24959`).
27
+
The default *behavior*, however, remains the same: the result is sorted, unless
28
+
29
+
1. ``self`` and ``other`` are identical
30
+
2. ``self`` or ``other`` is empty
31
+
3. ``self`` or ``other`` contain values that can not be compared (a ``RuntimeWarning`` is raised).
32
+
33
+
This change will allow ``sort=True`` to mean "always sort" in a future release.
34
+
35
+
The same change applies to :meth:`Index.difference` and :meth:`Index.symmetric_difference`, which
36
+
would not sort the result when the values could not be compared.
37
+
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".
47
+
18
48
.. _whatsnew_0241.regressions:
19
49
20
50
Fixed Regressions
21
-
^^^^^^^^^^^^^^^^^
51
+
~~~~~~~~~~~~~~~~~
22
52
23
53
- Bug in :meth:`DataFrame.itertuples` with ``records`` orient raising an ``AttributeError`` when the ``DataFrame`` contained more than 255 columns (:issue:`24939`)
24
54
- Bug in :meth:`DataFrame.itertuples` orient converting integer column names to strings prepended with an underscore (:issue:`24940`)
0 commit comments