Skip to content

Commit 8617a57

Browse files
committed
Merge branch 'main' into depr-unit
2 parents 88d33e2 + d815947 commit 8617a57

File tree

108 files changed

+1697
-983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1697
-983
lines changed

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
163163

164164
- name: Build wheels
165-
uses: pypa/cibuildwheel@v3.1.4
165+
uses: pypa/cibuildwheel@v3.2.0
166166
with:
167167
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
168168
env:

asv_bench/benchmarks/algorithms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ class SortIntegerArray:
199199
params = [10**3, 10**5]
200200

201201
def setup(self, N):
202-
data = np.arange(N, dtype=float)
203-
data[40] = np.nan
202+
data = np.arange(N, dtype=float).astype(object)
203+
data[40] = pd.NA
204204
self.array = pd.array(data, dtype="Int64")
205205

206206
def time_argsort(self, N):

asv_bench/benchmarks/frame_methods.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55

66
from pandas import (
7+
NA,
78
DataFrame,
89
Index,
910
MultiIndex,
@@ -445,6 +446,8 @@ def setup(self, inplace, dtype):
445446
values[::2] = np.nan
446447
if dtype == "Int64":
447448
values = values.round()
449+
values = values.astype(object)
450+
values[::2] = NA
448451
self.df = DataFrame(values, dtype=dtype)
449452
self.fill_values = self.df.iloc[self.df.first_valid_index()].to_dict()
450453

asv_bench/benchmarks/groupby.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,10 @@ def setup(self, dtype, method, with_nans):
689689
null_vals = vals.astype(float, copy=True)
690690
null_vals[::2, :] = np.nan
691691
null_vals[::3, :] = np.nan
692+
if dtype in ["Int64", "Float64"]:
693+
null_vals = null_vals.astype(object)
694+
null_vals[::2, :] = NA
695+
null_vals[::3, :] = NA
692696
df = DataFrame(null_vals, columns=list("abcde"), dtype=dtype)
693697
df["key"] = keys
694698
self.df = df

doc/source/user_guide/text.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ or convert from existing pandas data:
7575

7676
.. ipython:: python
7777
78-
s1 = pd.Series([1, 2, np.nan], dtype="Int64")
78+
s1 = pd.Series([1, 2, pd.NA], dtype="Int64")
7979
s1
8080
s2 = s1.astype("string")
8181
s2

doc/source/whatsnew/v0.21.0.rst

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -635,22 +635,17 @@ Previous behavior:
635635
636636
New behavior:
637637

638-
.. code-block:: ipython
638+
.. ipython:: python
639639
640-
In [1]: pi = pd.period_range('2017-01', periods=12, freq='M')
640+
pi = pd.period_range('2017-01', periods=12, freq='M')
641641
642-
In [2]: s = pd.Series(np.arange(12), index=pi)
642+
s = pd.Series(np.arange(12), index=pi)
643643
644-
In [3]: resampled = s.resample('2Q').mean()
644+
resampled = s.resample('2Q').mean()
645645
646-
In [4]: resampled
647-
Out[4]:
648-
2017Q1 2.5
649-
2017Q3 8.5
650-
Freq: 2Q-DEC, dtype: float64
646+
resampled
651647
652-
In [5]: resampled.index
653-
Out[5]: PeriodIndex(['2017Q1', '2017Q3'], dtype='period[2Q-DEC]')
648+
resampled.index
654649
655650
Upsampling and calling ``.ohlc()`` previously returned a ``Series``, basically identical to calling ``.asfreq()``. OHLC upsampling now returns a DataFrame with columns ``open``, ``high``, ``low`` and ``close`` (:issue:`13083`). This is consistent with downsampling and ``DatetimeIndex`` behavior.
656651

doc/source/whatsnew/v0.24.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ marker of ``np.nan`` will infer to integer dtype. The display of the ``Series``
5050

5151
.. ipython:: python
5252
53-
s = pd.Series([1, 2, np.nan], dtype='Int64')
53+
s = pd.Series([1, 2, pd.NA], dtype='Int64')
5454
s
5555
5656
@@ -166,7 +166,7 @@ See the :ref:`dtypes docs <basics.dtypes>` for more on extension arrays.
166166

167167
.. ipython:: python
168168
169-
pd.array([1, 2, np.nan], dtype='Int64')
169+
pd.array([1, 2, pd.NA], dtype='Int64')
170170
pd.array(['a', 'b', 'c'], dtype='category')
171171
172172
Passing data for which there isn't dedicated extension type (e.g. float, integer, etc.)

doc/source/whatsnew/v2.2.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ Other Deprecations
664664
- Deprecated :meth:`DatetimeArray.__init__` and :meth:`TimedeltaArray.__init__`, use :func:`array` instead (:issue:`55623`)
665665
- Deprecated :meth:`Index.format`, use ``index.astype(str)`` or ``index.map(formatter)`` instead (:issue:`55413`)
666666
- Deprecated :meth:`Series.ravel`, the underlying array is already 1D, so ravel is not necessary (:issue:`52511`)
667-
- Deprecated :meth:`Series.resample` and :meth:`DataFrame.resample` with a :class:`PeriodIndex` (and the 'convention' keyword), convert to :class:`DatetimeIndex` (with ``.to_timestamp()``) before resampling instead (:issue:`53481`)
667+
- Deprecated :meth:`Series.resample` and :meth:`DataFrame.resample` with a :class:`PeriodIndex` (and the 'convention' keyword), convert to :class:`DatetimeIndex` (with ``.to_timestamp()``) before resampling instead (:issue:`53481`). Note: this deprecation was later undone in pandas 2.3.3 (:issue:`57033`)
668668
- Deprecated :meth:`Series.view`, use :meth:`Series.astype` instead to change the dtype (:issue:`20251`)
669669
- Deprecated :meth:`offsets.Tick.is_anchored`, use ``False`` instead (:issue:`55388`)
670670
- Deprecated ``core.internals`` members ``Block``, ``ExtensionBlock``, and ``DatetimeTZBlock``, use public APIs instead (:issue:`55139`)

doc/source/whatsnew/v2.3.2.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ become the default string dtype in pandas 3.0. See
2222

2323
Bug fixes
2424
^^^^^^^^^
25-
- Fix :meth:`~Series.str.isdigit` to correctly recognize unicode superscript
26-
characters as digits for :class:`StringDtype` backed by PyArrow (:issue:`61466`)
2725
- Fix :meth:`~DataFrame.to_json` with ``orient="table"`` to correctly use the
2826
"string" type in the JSON Table Schema for :class:`StringDtype` columns
2927
(:issue:`61889`)
@@ -39,4 +37,4 @@ Bug fixes
3937
Contributors
4038
~~~~~~~~~~~~
4139

42-
.. contributors:: v2.3.1..v2.3.2|HEAD
40+
.. contributors:: v2.3.1..v2.3.2

doc/source/whatsnew/v2.3.3.rst

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.. _whatsnew_233:
22

3-
What's new in 2.3.3 (September XX, 2025)
3+
What's new in 2.3.3 (September 29, 2025)
44
----------------------------------------
55

66
These are the changes in pandas 2.3.3. See :ref:`release` for a full changelog
77
including other versions of pandas.
88

99
{{ header }}
1010

11-
.. _whatsnew_220.py14_compat:
11+
.. _whatsnew_233.py14_compat:
1212

1313
Pandas 2.3.3 is now compatible with Python 3.14
1414
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -37,29 +37,42 @@ Improvements
3737
specifying ``include=["object"]`` for backwards compatibility. In a future
3838
release, this will be deprecated and code for pandas 3+ should be updated to
3939
do ``include=["str"]`` (:issue:`61916`)
40-
40+
- Support the ``/`` operation between a ``pathlib.Path`` object and a :class:`StringDtype`
41+
Series, similarly as it works for object-dtype Series (:issue:`61940`)
4142

4243
.. _whatsnew_233.string_fixes.bugs:
4344

4445
Bug fixes
4546
^^^^^^^^^
4647
- Fix bug in :meth:`Series.str.replace` using named capture groups (e.g., ``\g<name>``) with the Arrow-backed dtype would raise an error (:issue:`57636`)
47-
- Fix regression in ``~Series.str.contains``, ``~Series.str.match`` and ``~Series.str.fullmatch``
48+
- Fix regression in :meth:`Series.str.contains`, :meth:`~Series.str.match` and :meth:`~Series.str.fullmatch`
4849
with a compiled regex and custom flags (:issue:`62240`)
49-
- Fix :meth:`Series.str.match` and :meth:`Series.str.fullmatch` not matching patterns with groups correctly for the Arrow-backed string dtype (:issue:`61072`)
50-
51-
52-
Improvements and fixes for Copy-on-Write
53-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54-
55-
Bug fixes
56-
^^^^^^^^^
57-
50+
- Fix :meth:`Series.str.match` and :meth:`~Series.str.fullmatch` not matching patterns with groups correctly for the Arrow-backed string dtype (:issue:`61072`)
51+
- Fix bug in :meth:`~DataFrame.groupby` with ``sum()`` and unobserved categories resulting in ``0`` instead of the empty string ``""`` (:issue:`61909`)
52+
- Fix :meth:`Series.str.isdigit` to correctly recognize unicode superscript
53+
characters as digits for :class:`StringDtype` backed by PyArrow (:issue:`61466`)
54+
- Fix comparing a :class:`StringDtype` Series with mixed objects raising an error (:issue:`60228`)
55+
- Fix error being raised when using a numpy ufunc with a Python-backed string array (:issue:`40800`)
56+
57+
Other changes
58+
~~~~~~~~~~~~~
59+
60+
- The deprecation of using :meth:`Series.resample` and :meth:`DataFrame.resample`
61+
with a :class:`PeriodIndex` (and the 'convention' keyword) has been undone.
62+
Resampling with a :class:`PeriodIndex` is supported again, but a subset of
63+
methods that return incorrect results will raise an error in pandas 3.0 (:issue:`57033`)
64+
65+
Other bug fixes
66+
~~~~~~~~~~~~~~~~
67+
68+
- Fix memory leak in :meth:`DataFrame.to_json` with datetime columns (:issue:`62204`)
69+
- Fixed regression in :meth:`DataFrame.from_records` not initializing subclasses properly (:issue:`57008`)
5870
- The :meth:`DataFrame.iloc` now works correctly with ``copy_on_write`` option when assigning values after subsetting the columns of a homogeneous DataFrame (:issue:`60309`)
5971

60-
6172
.. ---------------------------------------------------------------------------
6273
.. _whatsnew_233.contributors:
6374

6475
Contributors
6576
~~~~~~~~~~~~
77+
78+
.. contributors:: v2.3.2..v2.3.3|HEAD

0 commit comments

Comments
 (0)