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 provided func to return a NumPy array (GH 63957)

  • Added ExtensionArray.count() (GH 64450)

  • Display formatting for float sequences in DataFrame cells now respects the display.precision option (GH 60503).

  • Improved the string repr of pd.core.arrays.SparseArray (GH 64547)

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#

  • APIs that accept an engine="numba" parameter with engine_kwargs will no longer pass through a nopython argument to numba.jit. This argument has had no effect since numba 0.59.0 (GH 64483).

Deprecations#

  • Deprecated DataFrameGroupBy.agg() and Resampler.agg() unpacking a scalar when the provided func returns 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 in func itself (GH 64014)

  • Deprecated arithmetic operations between pandas objects (DataFrame, Series, Index, and pandas-implemented ExtensionArray subclasses) and list-likes other than list, np.ndarray, ExtensionArray, Index, Series, DataFrame. For e.g. tuple or range, explicitly cast these to a supported object instead. In a future version, these will be treated as scalar-like for pointwise operation (GH 62423)

  • Deprecated the .name property of offset objects (e.g., Day, Hour). Use .rule_code instead (GH 64207)

Performance improvements#

  • Performance improvement in DataFrame.__getitem__() when selecting a single column by label on a DataFrame with duplicate column names. (GH 64126).

  • Performance improvement in infer_freq() (GH 64463)

  • Performance improvement in merge() with how="cross" (GH 38082)

  • Performance improvement in merge() with how="left" (GH 64370)

  • Performance improvement in GroupBy.quantile() (GH 64330)

  • Performance improvement in datetime/timedelta unit conversion (e.g. datetime64[s] to datetime64[ns]) (GH 35025)

Bug fixes#

  • Fix bug in to_datetime() that could give an unnecessary RuntimeWarning when converting DataFrame containing missing values (GH 64141)

Categorical#

Datetimelike#

  • Bug in Timestamp constructor, Timedelta constructor, to_datetime(), and to_timedelta() with non-round float input and unit failing to raise when the value is just outside the representable bounds (GH 57366)

  • Bug in DatetimeArray.isin() and TimedeltaArray.isin() where mismatched resolutions could silently truncate finer-resolution values, leading to false matches (GH 64545)

Timedelta#

Timezones#

Numeric#

  • Fixed bug in read_excel() where having a column with mixture of numeric and boolean values will typecast the values based on the first appearance data type since 1==True and 0==False (GH 60088)

  • Fixed bug in Series.clip() where passing a scalar numpy array (e.g. np.array(0)) would raise a TypeError (GH 59053)

Conversion#

Strings#

Interval#

Indexing#

Missing#

MultiIndex#

I/O#

  • Fixed bug in read_excel() where usage of skiprows could lead to an infinite loop (GH 64027)

  • Fixed read_json() with lines=True and chunksize to respect nrows when the requested row count is not a multiple of the chunk size (GH 64025)

  • Fixed read_json() with lines=True and nrows=0 to return an empty DataFrame (GH 64025)

Period#

Plotting#

Groupby/resample/rolling#

Reshaping#

  • In pivot_table(), when values is empty, the aggregation will be computed on a Series of all NA values (GH 46475)

Sparse#

  • Bug in indexing a SparseArray with an out-of-bounds integer with the value of the length of the array returning the fill value instead of raising an IndexError (GH 64183).

ExtensionArray#

  • Fixed bug in Series.apply() and Series.map() where nullable integer dtypes were converted to float, causing precision loss for large integers; now the nullable dtype will be preserved (GH 63903).

Styler#

Other#

Contributors#