What’s new in 3.2.0 (Month XX, 2027)#
These are the changes in pandas 3.2.0. See Release notes for a full changelog including other versions of pandas.
Enhancements#
enhancement1#
enhancement2#
Other enhancements#
Display formatting for complex numbers in
objectdtype and forintervaldtype values with float endpoints now respects thedisplay.precisionanddisplay.float_formatoptions (GH 25920).The
ExtensionArraybase tests inpandas.tests.extension.basenow issue aerrors.PerformanceWarningwhen the array uses the default, possibly slow, implementation ofunique,factorize,argsort,argmin,argmax, orsearchsorted(GH 24433)
Notable bug fixes#
These are bug fixes that might have notable behavior changes.
notable_bug_fix1#
notable_bug_fix2#
Backwards incompatible API changes#
Increased minimum versions for dependencies#
Some minimum supported versions of dependencies were updated. If installed, we now require:
Package |
Minimum Version |
Required |
Changed |
|---|---|---|---|
X |
X |
For optional libraries the general recommendation is to use the latest version. The following table lists the lowest version per library that is currently being tested throughout the development of pandas. Optional libraries below the lowest tested version may still work, but are not considered supported.
Package |
Minimum Version |
Changed |
|---|---|---|
X |
See Dependencies and Optional dependencies for more.
Other API changes#
Deprecations#
deprecation1#
deprecation2#
Other deprecations#
Deprecated
pandas.to_pickle, use theDataFrame.to_pickle()orSeries.to_pickle()method instead (GH 48402)Deprecated the
cache_datesargument inread_csv(),read_table(), andread_fwf()(GH 68705)
Performance improvements#
Performance improvement in
read_csv()withengine="c"across the board, in tokenizing and in the machinery shared by all column types; large uncompressed local files are additionally read in parallel across multiple CPU cores by default, see above (GH 64347, GH 64515, GH 65350, GH 66271, GH 66272, GH 66273, GH 66274, GH 66276, GH 66798, GH 68314, GH 69632, GH 69748)Performance improvement in
PeriodIndex.strftime()with a customdate_format(GH 70106)
Bug fixes#
Categorical#
Datetimelike#
Bug in
DataFrame.astype(),Series.astype(),Index.astype(),DatetimeIndex,array()andto_datetime()wherefloatdtype data outside theint64range, such asinf, silently became a valid-lookingdatetime64/timedelta64value orNaT; these now raiseOutOfBoundsDatetime/OutOfBoundsTimedelta(GH 68926)Bug in
DatetimeIndex.strftime(),Series.dt.strftime(), andDataFrame.to_csv()withdate_formaton Windows silently replacing values thatTimestamp.strftime()cannot format (e.g.%yfor years before 1900) with their default string representation; these now raiseValueError(GH 58178)
Timedelta#
Timezones#
Numeric#
Conversion#
Strings#
Interval#
Bug in
concat()andIndex.append()withIntervalDtypenot retaining an extension dtype subtype, either casting it to a NumPy dtype or raisingTypeError(GH 64297)Bug in
Series.shift()andDataFrame.shift()with anIntervalDtypecolumn not retaining the subtype, either changing it or raisingTypeError(GH 69922)
Indexing#
Bug in
DataFrame.loc()andDataFrame.iloc()setitem on a 1-columnDataFramewith an extension dtype raising when the column key is an all-Falseboolean mask or an empty list-like (GH 70232)Bug in
DataFrame.loc()andSeries.loc()setitem with an integer slice raisingTypeErrorwhere the same.locgetitem succeeds, e.g. on an index ofdecimal.Decimalvalues (GH 70219)Bug in
Index.difference()dropping elements that are not inotherwhenotherwas aDatetimeIndex,TimedeltaIndexorPeriodIndexand the elements were strings that parse to its values, or whenotherwas anIntervalIndexand the elements were scalars contained in its intervals (GH 58971)
Missing#
MultiIndex#
I/O#
Bug in
DataFrame.to_parquet()withengine="pyarrow"where a misspelled keyword argument truncated an existing file at the destination or was reported as an error about the path (GH 45815)Bug in the repr of a
SeriesorDataFramewithlongdouble(e.g.float128) dtype showing values outside thefloat64range as0orinf(GH 17809)
Period#
Bug in
Period.strftime()andPeriodIndex.strftime()where%Ywas not zero-padded for years before 1000 on Linux (GH 48746)
Plotting#
Bug in
DataFrame.plot()andSeries.plot()withkind="bar"orkind="barh"raisingTypeErrorontimedelta64data containingNaT(GH 39320)
Groupby/resample/rolling#
Bug in
Series.resample()andDataFrame.resample()with aPeriodIndexandclosed="right"returning shifted labels or incorrect aggregations (GH 44363)
Reshaping#
Sparse#
ExtensionArray#
Bug in
read_csv()and other parsing of strings into a decimalArrowDtyperaisingArrowInvalidinstead of parsing the values (GH 69838)
Styler#
Other#
Bug in
testing.assert_series_equal()andtesting.assert_frame_equal()withcheck_dtype=Falseandcheck_exact=Truecomparing missing values against an object column differently fromcheck_exact=False;pd.NAandNaTno longer matchnp.nanorNone(GH 61473)Bug in
DataFrame.query()andDataFrame.eval()where==and!=against a string gave different results than the same comparison outside ofquery, e.g. returning no rows for adatetime64,timedelta64, orPeriodDtypecolumn, or raisingNotImplementedErrorwithparser="python"(GH 54199)
Contributors#
A total of 10 people contributed patches to this release. People with a “+” by their names contributed a patch for the first time.
Claude Opus 5
Claude Opus 5.5
Joris Van den Bossche
Julian Harbeck
N3verm1nd
Richard Shadrach
Vincent Ngo +
dependabot[bot]
jbrockmendel
ump45nose