What’s new in 2.0.1 (April 24, 2023)#
These are the changes in pandas 2.0.1. See Release notes for a full changelog including other versions of pandas.
Fixed regressions#
- Fixed regression for subclassed Series when constructing from a dictionary (GH 52445) 
- Fixed regression in - SeriesGroupBy.agg()failing when grouping with categorical data, multiple groupings,- as_index=False, and a list of aggregations (GH 52760)
- Fixed regression in - DataFrame.pivot()changing- Indexname of input object (GH 52629)
- Fixed regression in - DataFrame.resample()raising on a DataFrame with no columns (GH 52484)
- Fixed regression in - DataFrame.sort_values()not resetting index when- DataFrameis already sorted and- ignore_index=True(GH 52553)
- Fixed regression in - MultiIndex.isin()raising- TypeErrorfor- Generator(GH 52568)
- Fixed regression in - Series.describe()showing- RuntimeWarningfor extension dtype- Serieswith one element (GH 52515)
- Fixed regression when adding a new column to a - DataFramewhen the- DataFrame.columnswas a- RangeIndexand the new key was hashable but not a scalar (GH 52652)
Bug fixes#
- Bug in - Series.dt.daysthat would overflow- int32number of days (GH 52391)
- Bug in - arrays.DatetimeArrayconstructor returning an incorrect unit when passed a non-nanosecond numpy datetime array (GH 52555)
- Bug in - ArrowExtensionArraywith duration dtype overflowing when constructed from data containing numpy- NaT(GH 52843)
- Bug in - Series.dt.round()when passing a- freqof equal or higher resolution compared to the- Serieswould raise a- ZeroDivisionError(GH 52761)
- Bug in - Series.median()with- ArrowDtypereturning an approximate median (GH 52679)
- Bug in - api.interchange.from_dataframe()was unnecessarily raising on categorical dtypes (GH 49889)
- Bug in - api.interchange.from_dataframe()was unnecessarily raising on large string dtypes (GH 52795)
- Bug in - pandas.testing.assert_series_equal()where- check_dtype=Falsewould still raise for datetime or timedelta types with different resolutions (GH 52449)
- Bug in - read_csv()casting PyArrow datetimes to NumPy when- dtype_backend="pyarrow"and- parse_datesis set causing a performance bottleneck in the process (GH 52546)
- Bug in - to_datetime()and- to_timedelta()when trying to convert numeric data with a- ArrowDtype(GH 52425)
- Bug in - to_numeric()with- errors='coerce'and- dtype_backend='pyarrow'with- ArrowDtypedata (GH 52588)
- Bug in - ArrowDtype.__from_arrow__()not respecting if dtype is explicitly given (GH 52533)
- Bug in - DataFrame.describe()not respecting- ArrowDtypein- includeand- exclude(GH 52570)
- Bug in - DataFrame.max()and related casting different- Timestampresolutions always to nanoseconds (GH 52524)
- Bug in - Series.describe()not returning- ArrowDtypewith- pyarrow.float64type with numeric data (GH 52427)
- Bug in - Series.dt.tz_localize()incorrectly localizing timestamps with- ArrowDtype(GH 52677)
- Bug in arithmetic between - np.datetime64and- np.timedelta64- NaTscalars with units always returning nanosecond resolution (GH 52295)
- Bug in logical and comparison operations between - ArrowDtypeand numpy masked types (e.g.- "boolean") (GH 52625)
- Fixed bug in - merge()when merging with- ArrowDtypeone one and a NumPy dtype on the other side (GH 52406)
- Fixed segfault in - Series.to_numpy()with- null[pyarrow]dtype (GH 52443)
Other#
- DataFramecreated from empty dicts had- columnsof dtype- object. It is now a- RangeIndex(GH 52404)
- Seriescreated from empty dicts had- indexof dtype- object. It is now a- RangeIndex(GH 52404)
- Implemented - Series.str.split()and- Series.str.rsplit()for- ArrowDtypewith- pyarrow.string(GH 52401)
- Implemented most - straccessor methods for- ArrowDtypewith- pyarrow.string(GH 52401)
- Supplying a non-integer hashable key that tests - Falsein- api.types.is_scalar()now raises a- KeyErrorfor- RangeIndex.get_loc(), like it does for- Index.get_loc(). Previously it raised an- InvalidIndexError(GH 52652).
Contributors#
A total of 20 people contributed patches to this release. People with a “+” by their names contributed a patch for the first time.
- Alex Malins + 
- Chris Carini + 
- Dea María Léon 
- Joris Van den Bossche 
- Luke Manley 
- Marc Garcia 
- Marco Edward Gorelli 
- MarcoGorelli 
- Matthew Roeschke 
- MeeseeksMachine 
- Natalia Mokeeva 
- Nirav + 
- Pandas Development Team 
- Patrick Hoefler 
- Richard Shadrach 
- Stefanie Molin 
- Terji Petersen 
- Thomas + 
- Thomas Li 
- yonashub