Skip to content

Commit 89e30cc

Browse files
Merge branch 'pandas-dev:main' into ordered_cat_corr
2 parents 71305aa + 1b5b02c commit 89e30cc

File tree

152 files changed

+1335
-1068
lines changed

Some content is hidden

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

152 files changed

+1335
-1068
lines changed

.github/workflows/code-checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v5
36+
uses: actions/checkout@v6
3737
with:
3838
fetch-depth: 0
3939

@@ -114,7 +114,7 @@ jobs:
114114

115115
steps:
116116
- name: Checkout
117-
uses: actions/checkout@v5
117+
uses: actions/checkout@v6
118118
with:
119119
fetch-depth: 0
120120

@@ -142,7 +142,7 @@ jobs:
142142

143143
steps:
144144
- name: Checkout
145-
uses: actions/checkout@v5
145+
uses: actions/checkout@v6
146146
with:
147147
fetch-depth: 0
148148

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- python
2828

2929
steps:
30-
- uses: actions/checkout@v5
30+
- uses: actions/checkout@v6
3131
- uses: github/codeql-action/init@v4
3232
with:
3333
languages: ${{ matrix.language }}

.github/workflows/docbuild-and-upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
steps:
3838
- name: Checkout
39-
uses: actions/checkout@v5
39+
uses: actions/checkout@v6
4040
with:
4141
fetch-depth: 0
4242

.github/workflows/package-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@v5
37+
uses: actions/checkout@v6
3838
with:
3939
fetch-depth: 0
4040

@@ -58,7 +58,7 @@ jobs:
5858
cancel-in-progress: true
5959
steps:
6060
- name: Checkout
61-
uses: actions/checkout@v5
61+
uses: actions/checkout@v6
6262
with:
6363
fetch-depth: 0
6464

.github/workflows/unit-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139

140140
steps:
141141
- name: Checkout
142-
uses: actions/checkout@v5
142+
uses: actions/checkout@v6
143143
with:
144144
fetch-depth: 0
145145

@@ -198,7 +198,7 @@ jobs:
198198

199199
steps:
200200
- name: Checkout
201-
uses: actions/checkout@v5
201+
uses: actions/checkout@v6
202202
with:
203203
fetch-depth: 0
204204

@@ -216,7 +216,7 @@ jobs:
216216
Linux-32-bit:
217217
runs-on: ubuntu-24.04
218218
container:
219-
image: quay.io/pypa/manylinux2014_i686
219+
image: quay.io/pypa/manylinux_2_28_i686
220220
options: --platform linux/386
221221
steps:
222222
- name: Checkout pandas Repo
@@ -336,7 +336,7 @@ jobs:
336336
PYTEST_TARGET: pandas
337337

338338
steps:
339-
- uses: actions/checkout@v5
339+
- uses: actions/checkout@v6
340340
with:
341341
fetch-depth: 0
342342

@@ -373,7 +373,7 @@ jobs:
373373
cancel-in-progress: true
374374
steps:
375375
- name: Checkout pandas Repo
376-
uses: actions/checkout@v5
376+
uses: actions/checkout@v6
377377
with:
378378
fetch-depth: 0
379379

.github/workflows/wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
sdist_file: ${{ steps.save-path.outputs.sdist_name }}
5252
steps:
5353
- name: Checkout pandas
54-
uses: actions/checkout@v5
54+
uses: actions/checkout@v6
5555
with:
5656
fetch-depth: 0
5757

@@ -122,7 +122,7 @@ jobs:
122122
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
123123
steps:
124124
- name: Checkout pandas
125-
uses: actions/checkout@v5
125+
uses: actions/checkout@v6
126126
with:
127127
fetch-depth: 0
128128

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
.noseids
2222
.ipynb_checkpoints
2323
.tags
24+
tags
2425
.cache/
2526
.vscode/
2627

ci/code_checks.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7373
-i "pandas.Period.freq GL08" \
7474
-i "pandas.Period.ordinal GL08" \
7575
-i "pandas.errors.IncompatibleFrequency SA01,SS06,EX01" \
76-
-i "pandas.errors.InvalidVersion GL08" \
7776
-i "pandas.api.extensions.ExtensionArray.value_counts EX01,RT03,SA01" \
7877
-i "pandas.api.typing.DataFrameGroupBy.plot PR02" \
7978
-i "pandas.api.typing.SeriesGroupBy.plot PR02" \
8079
-i "pandas.api.typing.Resampler.quantile PR01,PR07" \
81-
-i "pandas.arrays.NumpyExtensionArray GL08" \
8280
-i "pandas.tseries.offsets.BDay PR02,SA01" \
8381
-i "pandas.tseries.offsets.BHalfYearBegin.is_on_offset GL08" \
8482
-i "pandas.tseries.offsets.BHalfYearBegin.n GL08" \

doc/source/whatsnew/v2.3.4.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ including other versions of pandas.
1313
Bug fixes
1414
^^^^^^^^^
1515
- Bug in :meth:`DataFrame.__getitem__` returning modified columns when called with ``slice`` in Python 3.12 (:issue:`57500`)
16+
- Bug in :meth:`Series.str.replace` raising an error on valid group references (``\1``, ``\2``, etc.) on series converted to PyArrow backend dtype (:issue:`62653`)
1617

1718
.. ---------------------------------------------------------------------------
1819
.. _whatsnew_234.contributors:

doc/source/whatsnew/v3.0.0.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ Other enhancements
234234
- Support reading Stata 102-format (Stata 1) dta files (:issue:`58978`)
235235
- Support reading Stata 110-format (Stata 7) dta files (:issue:`47176`)
236236
- Switched wheel upload to **PyPI Trusted Publishing** (OIDC) for release-tag pushes in ``wheels.yml``. (:issue:`61718`)
237+
- Added a new :meth:`DataFrame.from_arrow` method to import any Arrow-compatible
238+
tabular data object into a pandas :class:`DataFrame` through the
239+
`Arrow PyCapsule Protocol <https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html>`__ (:issue:`59631`)
237240

238241
.. ---------------------------------------------------------------------------
239242
.. _whatsnew_300.notable_bug_fixes:
@@ -748,8 +751,13 @@ Other API changes
748751
- :class:`Series` "flex" methods like :meth:`Series.add` no longer allow passing a :class:`DataFrame` for ``other``; use the DataFrame reversed method instead (:issue:`46179`)
749752
- :meth:`CategoricalIndex.append` no longer attempts to cast different-dtype indexes to the caller's dtype (:issue:`41626`)
750753
- :meth:`ExtensionDtype.construct_array_type` is now a regular method instead of a ``classmethod`` (:issue:`58663`)
754+
- Arithmetic operations between a :class:`Series`, :class:`Index`, or :class:`ExtensionArray` with a ``list`` now consistently wrap that list with an array equivalent to ``Series(my_list).array``. To do any other kind of type inference or casting, do so explicitly before operating (:issue:`62552`)
751755
- Comparison operations between :class:`Index` and :class:`Series` now consistently return :class:`Series` regardless of which object is on the left or right (:issue:`36759`)
752756
- Numpy functions like ``np.isinf`` that return a bool dtype when called on a :class:`Index` object now return a bool-dtype :class:`Index` instead of ``np.ndarray`` (:issue:`52676`)
757+
- Methods that can operate in-place (:meth:`~DataFrame.replace`, :meth:`~DataFrame.fillna`,
758+
:meth:`~DataFrame.ffill`, :meth:`~DataFrame.bfill`, :meth:`~DataFrame.interpolate`,
759+
:meth:`~DataFrame.where`, :meth:`~DataFrame.mask`, :meth:`~DataFrame.clip`) now return
760+
the modified DataFrame or Series (``self``) instead of ``None`` when ``inplace=True`` (:issue:`63207`)
753761

754762
.. ---------------------------------------------------------------------------
755763
.. _whatsnew_300.deprecations:
@@ -1124,7 +1132,6 @@ Conversion
11241132
Strings
11251133
^^^^^^^
11261134
- Bug in :meth:`Series.str.match` failing to raise when given a compiled ``re.Pattern`` object and conflicting ``case`` or ``flags`` arguments (:issue:`62240`)
1127-
- Bug in :meth:`Series.str.replace` raising an error on valid group references (``\1``, ``\2``, etc.) on series converted to PyArrow backend dtype (:issue:`62653`)
11281135
- Bug in :meth:`Series.str.zfill` raising ``AttributeError`` for :class:`ArrowDtype` (:issue:`61485`)
11291136
- Bug in :meth:`Series.value_counts` would not respect ``sort=False`` for series having ``string`` dtype (:issue:`55224`)
11301137
- Bug in multiplication with a :class:`StringDtype` incorrectly allowing multiplying by bools; explicitly cast to integers instead (:issue:`62595`)
@@ -1183,6 +1190,7 @@ I/O
11831190
- Fix bug in ``on_bad_lines`` callable when returning too many fields: now emits
11841191
``ParserWarning`` and truncates extra fields regardless of ``index_col`` (:issue:`61837`)
11851192
- Bug in :func:`pandas.json_normalize` inconsistently handling non-dict items in ``data`` when ``max_level`` was set. The function will now raise a ``TypeError`` if ``data`` is a list containing non-dict items (:issue:`62829`)
1193+
- Bug in :func:`pandas.json_normalize` raising ``TypeError`` when ``meta`` contained a non-string key (e.g., ``int``) and ``record_path`` was specified, which was inconsistent with the behavior when ``record_path`` was ``None`` (:issue:`63019`)
11861194
- Bug in :meth:`.DataFrame.to_json` when ``"index"`` was a value in the :attr:`DataFrame.column` and :attr:`Index.name` was ``None``. Now, this will fail with a ``ValueError`` (:issue:`58925`)
11871195
- Bug in :meth:`.io.common.is_fsspec_url` not recognizing chained fsspec URLs (:issue:`48978`)
11881196
- Bug in :meth:`DataFrame._repr_html_` which ignored the ``"display.float_format"`` option (:issue:`59876`)
@@ -1245,6 +1253,7 @@ Groupby/resample/rolling
12451253
- Bug in :meth:`.DataFrameGroupBy.groups` and :meth:`.SeriesGroupby.groups` that would not respect groupby argument ``dropna`` (:issue:`55919`)
12461254
- Bug in :meth:`.DataFrameGroupBy.median` where nat values gave an incorrect result. (:issue:`57926`)
12471255
- Bug in :meth:`.DataFrameGroupBy.quantile` when ``interpolation="nearest"`` is inconsistent with :meth:`DataFrame.quantile` (:issue:`47942`)
1256+
- Bug in :meth:`.DataFrameGroupBy.sum` and :meth:`.SeriesGroupby.groups` returning ``NaN`` on overflow. These methods now returns ``inf`` or ``-inf`` on overflow. (:issue:`60303`)
12481257
- Bug in :meth:`.DataFrameGroupBy` reductions where non-Boolean values were allowed for the ``numeric_only`` argument; passing a non-Boolean value will now raise (:issue:`62778`)
12491258
- Bug in :meth:`.Resampler.interpolate` on a :class:`DataFrame` with non-uniform sampling and/or indices not aligning with the resulting resampled index would result in wrong interpolation (:issue:`21351`)
12501259
- Bug in :meth:`.Series.rolling` when used with a :class:`.BaseIndexer` subclass and computing min/max (:issue:`46726`)
@@ -1264,10 +1273,12 @@ Groupby/resample/rolling
12641273
- Bug in :meth:`DataFrameGroupby.transform` and :meth:`SeriesGroupby.transform` with a reducer and ``observed=False`` that coerces dtype to float when there are unobserved categories. (:issue:`55326`)
12651274
- Bug in :meth:`Rolling.apply` for ``method="table"`` where column order was not being respected due to the columns getting sorted by default. (:issue:`59666`)
12661275
- Bug in :meth:`Rolling.apply` where the applied function could be called on fewer than ``min_period`` periods if ``method="table"``. (:issue:`58868`)
1276+
- Bug in :meth:`Rolling.sem` computing incorrect results because it divided by ``sqrt((n - 1) * (n - ddof))`` instead of ``sqrt(n * (n - ddof))``. (:issue:`63180`)
12671277
- Bug in :meth:`Rolling.skew` incorrectly computing skewness for windows following outliers due to numerical instability. The calculation now properly handles catastrophic cancellation by recomputing affected windows (:issue:`47461`)
12681278
- Bug in :meth:`Series.resample` could raise when the date range ended shortly before a non-existent time. (:issue:`58380`)
12691279
- Bug in :meth:`Series.resample` raising error when resampling non-nanosecond resolutions out of bounds for nanosecond precision (:issue:`57427`)
12701280
- Bug in :meth:`Series.rolling.var` and :meth:`Series.rolling.std` computing incorrect results due to numerical instability. (:issue:`47721`, :issue:`52407`, :issue:`54518`, :issue:`55343`)
1281+
- Bug in :meth:`DataFrame.groupby` methods when operating on NumPy-nullable data failing when the NA mask was not C-contiguous (:issue:`61031`)
12711282

12721283
Reshaping
12731284
^^^^^^^^^

0 commit comments

Comments
 (0)