What’s new in 0.24.1 (February 3, 2019) — pandas 3.0.0rc0+31.g944c527c0a documentation (original) (raw)
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 Dropping Python 2.7 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() has changed from True to None (GH 24959). The default behavior, however, remains the same: the result is sorted, unless
selfandotherare identicalselforotheris emptyselforothercontain values that can not be compared (aRuntimeWarningis raised).
This change will allow sort=True to mean “always sort” in a future release.
The same change applies to Index.difference() and Index.symmetric_difference(), which would not sort the result when the values could not be compared.
The sort option for Index.intersection() has changed in three ways.
- The default has changed from
TruetoFalse, to restore the pandas 0.23.4 and earlier behavior of not sorting by default. - The behavior of
sort=Truecan now be obtained withsort=None. This will sort the result only if the values inselfandotherare not identical. - The value
sort=Trueis no longer allowed. A future version of pandas will properly supportsort=Truemeaning “always sort”.
Fixed regressions#
- Fixed regression in DataFrame.to_dict() with
recordsorient raising anAttributeErrorwhen theDataFramecontained more than 255 columns, or wrongly converting column names that were not valid python identifiers (GH 24939, GH 24940). - Fixed regression in read_sql() when passing certain queries with MySQL/pymysql (GH 24988).
- Fixed regression in Index.intersection incorrectly sorting the values by default (GH 24959).
- Fixed regression in merge() when merging an empty
DataFramewith multiple timezone-aware columns on one of the timezone-aware columns (GH 25014). - Fixed regression in Series.rename_axis() and DataFrame.rename_axis() where passing
Nonefailed to remove the axis name (GH 25034) - Fixed regression in to_timedelta() with
box=Falseincorrectly returning adatetime64object instead of atimedelta64object (GH 24961) - Fixed regression where custom hashable types could not be used as column keys in DataFrame.set_index() (GH 24969)
Bug fixes#
Reshaping
- Bug in DataFrame.groupby() with Grouper when there is a time change (DST) and grouping frequency is
'1d'(GH 24972)
Visualization
- Fixed the warning for implicitly registered matplotlib converters not showing. See Restore Matplotlib datetime converter registration for more (GH 24963).
Other
- Fixed AttributeError when printing a DataFrame’s HTML repr after accessing the IPython config object (GH 25036)
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