What’s new in 3.1.0 (Month XX, 2026)#
These are the changes in pandas 3.1.0. See Release notes for a full changelog including other versions of pandas.
Enhancements#
enhancement1#
enhancement2#
Other enhancements#
DataFrameGroupBy.agg()now allows for the providedfuncto return a NumPy array (GH 63957)Display formatting for float sequences in DataFrame cells now respects the
display.precisionoption (GH 60503).
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#
Deprecated
DataFrameGroupBy.agg()andResampler.agg()unpacking a scalar when the providedfuncreturns a Series or array of length 1; in the future this will result in the Series or array being in the result. Users should unpack the scalar infuncitself (GH 64014)
Performance improvements#
Bug fixes#
Categorical#
Datetimelike#
Timedelta#
Timezones#
Numeric#
Fixed bug in
Series.clip()where passing a scalar numpy array (e.g.np.array(0)) would raise aTypeError(GH 59053)
Conversion#
Fixed
pandas.array()to preserve mask information when converting NumPy masked arrays, converting masked values to missing values (GH 63879).
Strings#
Interval#
Indexing#
Missing#
MultiIndex#
I/O#
Fixed bug in
read_excel()where usage ofskiprowscould lead to an infinite loop (GH 64027)Fixed
read_json()withlines=Trueandchunksizeto respectnrowswhen the requested row count is not a multiple of the chunk size (GH 64025)Fixed
read_json()withlines=Trueandnrows=0to return an empty DataFrame (GH 64025)
Period#
Plotting#
Groupby/resample/rolling#
Bug in
DataFrameGroupBy.agg()when there are no groups, multiple keys, andgroup_keys=False(GH 51445)Bug in
DataFrameGroupBy.agg()would operate on the group as a whole whenargsorkwargsare supplied for the providedfunc; now this method only operates on each Series of the group (GH 39169)
Reshaping#
In
pivot_table(), whenvaluesis empty, the aggregation will be computed on a Series of all NA values (GH 46475)
Sparse#
ExtensionArray#
Fixed bug in
Series.apply()andSeries.map()where nullable integer dtypes were converted to float, causing precision loss for large integers; now the nullable dtype will be preserved (GH 63903).