What’s new in 2.3.0 (June 4, 2025)#

These are the changes in pandas 2.3.0. See Release notes for a full changelog including other versions of pandas.

Enhancements#

Other enhancements#

Notable bug fixes#

These are bug fixes that might have notable behavior changes.

notable_bug_fix1#

In previous versions, comparing Series of different string dtypes (e.g. pd.StringDtype("pyarrow", na_value=pd.NA) against pd.StringDtype("python", na_value=np.nan)) would result in inconsistent resulting dtype or incorrectly raise. pandas will now use the hierarchy

Increased minimum version for Python#

in determining the result dtype when there are different string dtypes compared. Some examples:

  • When pd.StringDtype("pyarrow", na_value=pd.NA) is compared against any other string dtype, the result will always be boolean[pyarrow].

  • When pd.StringDtype("python", na_value=pd.NA) is compared against pd.StringDtype("pyarrow", na_value=np.nan), the result will be boolean, the NumPy-backed nullable extension array.

  • When pd.StringDtype("python", na_value=pd.NA) is compared against pd.StringDtype("python", na_value=np.nan), the result will be boolean, the NumPy-backed nullable extension array.

API changes#

  • When enabling the future.infer_string option, Index set operations (like union or intersection) will now ignore the dtype of an empty RangeIndex or empty Index with object dtype when determining the dtype of the resulting Index (GH 60797)

Deprecations#

  • Deprecated allowing non-bool values for na in str.contains(), str.startswith(), and str.endswith() for dtypes that do not already disallow these (GH 59615)

  • Deprecated the "pyarrow_numpy" storage option for StringDtype (GH 60152)

  • The deprecation of setting the argument include_groups to True in DataFrameGroupBy.apply() has been promoted from a DeprecationWarning to FutureWarning; only False will be allowed (GH 7155)

Bug fixes#

Numeric#

Strings#

Indexing#

I/O#

Other#

  • Fixed usage of inspect when the optional dependencies pyarrow or jinja2 are not installed (GH 60196)

Contributors#

A total of 24 people contributed patches to this release. People with a “+” by their names contributed a patch for the first time.

  • ChiLin Chiu +

  • Irv Lustig

  • Isuru Fernando +

  • Jake Thomas Trevallion +

  • Joris Van den Bossche

  • Kevin Amparado +

  • LOCHAN PAUDEL +

  • Lumberbot (aka Jack)

  • Marc Mueller +

  • Marco Edward Gorelli

  • Matthew Roeschke

  • Pandas Development Team

  • Patrick Hoefler

  • Richard Shadrach

  • SALCAN +

  • Sebastian Berg

  • Simon Hawkins

  • Thomas Li

  • Will Ayd

  • William Andrea

  • William Ayd

  • dependabot[bot]

  • jbrockmendel

  • tasfia8 +