# Whats new in 0.24.1 (February 3, 2019)
Warning
The 0.24.x series of releases will be the last to support Python 2. Future feature releases will support Python 3 only. See Plan for dropping Python 2.7 (opens new window) for more.
These are the changes in pandas 0.24.1. See Release Notes for a full changelog including other versions of pandas. See What’s new in 0.24.0 (January 25, 2019) for the 0.24.0 changelog.
# API changes
# Changing the sort
parameter for Index
set operations
The default sort
value for Index.union()
(opens new window) has changed from True
to None
(GH24959 (opens new window)).
The default behavior, however, remains the same: the result is sorted, unless
self
andother
are identicalself
orother
is emptyself
orother
contain values that can not be compared (aRuntimeWarning
is raised).
This change will allow sort=True
to mean “always sort” in a future release.
The same change applies to Index.difference()
(opens new window) and Index.symmetric_difference()
(opens new window), which
would not sort the result when the values could not be compared.
The sort option for Index.intersection()
(opens new window) has changed in three ways.
- The default has changed from
True
toFalse
, to restore the pandas 0.23.4 and earlier behavior of not sorting by default. - The behavior of
sort=True
can now be obtained withsort=None
. This will sort the result only if the values inself
andother
are not identical. - The value
sort=True
is no longer allowed. A future version of pandas will properly supportsort=True
meaning “always sort”.
# Fixed regressions
- Fixed regression in
DataFrame.to_dict()
(opens new window) withrecords
orient raising anAttributeError
when theDataFrame
contained more than 255 columns, or wrongly converting column names that were not valid python identifiers (GH24939 (opens new window), GH24940 (opens new window)). - Fixed regression in
read_sql()
(opens new window) when passing certain queries with MySQL/pymysql (GH24988 (opens new window)). - Fixed regression in
Index.intersection
(opens new window) incorrectly sorting the values by default (GH24959 (opens new window)). - Fixed regression in
merge()
(opens new window) when merging an emptyDataFrame
with multiple timezone-aware columns on one of the timezone-aware columns (GH25014 (opens new window)). - Fixed regression in
Series.rename_axis()
(opens new window) andDataFrame.rename_axis()
(opens new window) where passingNone
failed to remove the axis name (GH25034 (opens new window)) - Fixed regression in
to_timedelta()
(opens new window) with box=False incorrectly returning adatetime64
object instead of atimedelta64
object (GH24961 (opens new window)) - Fixed regression where custom hashable types could not be used as column keys in
DataFrame.set_index()
(opens new window) (GH24969 (opens new window))
# Bug fixes
Reshaping
- Bug in
DataFrame.groupby()
(opens new window) withGrouper
(opens new window) when there is a time change (DST) and grouping frequency is'1d'
(GH24972 (opens new window))
Visualization
- Fixed the warning for implicitly registered matplotlib converters not showing. See Restore Matplotlib datetime converter registration for more (GH24963 (opens new window)).
Other
- Fixed AttributeError when printing a DataFrame’s HTML repr after accessing the IPython config object (GH25036 (opens new window))
# Contributors
A total of 7 people contributed patches to this release. People with a “+” by their names contributed a patch for the first time.
- Alex Buchkovsky
- Roman Yurchak
- h-vetinari
- jbrockmendel
- Jeremy Schendel
- Joris Van den Bossche
- Tom Augspurger