Skip to content

Commit 1d5239a

Browse files
authored
Merge branch 'main' into whatsnew-60898
2 parents 1f7c3d4 + e6da5f2 commit 1d5239a

26 files changed

+95
-52
lines changed

.github/workflows/wheels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
- [ubuntu-24.04, manylinux_x86_64]
9696
- [ubuntu-24.04, musllinux_x86_64]
9797
- [ubuntu-24.04-arm, manylinux_aarch64]
98+
- [ubuntu-24.04-arm, musllinux_aarch64]
9899
- [macos-13, macosx_x86_64]
99100
# Note: M1 images on Github Actions start from macOS 14
100101
- [macos-14, macosx_arm64]

doc/source/user_guide/reshaping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ variables and the values representing the presence of those variables per row.
395395
pd.get_dummies(df["key"])
396396
df["key"].str.get_dummies()
397397
398-
``prefix`` adds a prefix to the the column names which is useful for merging the result
398+
``prefix`` adds a prefix to the column names which is useful for merging the result
399399
with the original :class:`DataFrame`:
400400

401401
.. ipython:: python

doc/source/user_guide/user_defined_functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ to the original data.
319319
320320
In the example, the ``warm_up_all_days`` function computes the ``max`` like an aggregation, but instead
321321
of returning just the maximum value, it returns a ``DataFrame`` with the same shape as the original one
322-
with the values of each day replaced by the the maximum temperature of the city.
322+
with the values of each day replaced by the maximum temperature of the city.
323323

324324
``transform`` is also available for :meth:`SeriesGroupBy.transform`, :meth:`DataFrameGroupBy.transform` and
325325
:meth:`Resampler.transform`, where it's more common. You can read more about ``transform`` in groupby

doc/source/whatsnew/v1.1.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ Missing
10391039
^^^^^^^
10401040
- Calling :meth:`fillna` on an empty :class:`Series` now correctly returns a shallow copied object. The behaviour is now consistent with :class:`Index`, :class:`DataFrame` and a non-empty :class:`Series` (:issue:`32543`).
10411041
- Bug in :meth:`Series.replace` when argument ``to_replace`` is of type dict/list and is used on a :class:`Series` containing ``<NA>`` was raising a ``TypeError``. The method now handles this by ignoring ``<NA>`` values when doing the comparison for the replacement (:issue:`32621`)
1042-
- Bug in :meth:`~Series.any` and :meth:`~Series.all` incorrectly returning ``<NA>`` for all ``False`` or all ``True`` values using the nulllable Boolean dtype and with ``skipna=False`` (:issue:`33253`)
1042+
- Bug in :meth:`~Series.any` and :meth:`~Series.all` incorrectly returning ``<NA>`` for all ``False`` or all ``True`` values using the nullable Boolean dtype and with ``skipna=False`` (:issue:`33253`)
10431043
- Clarified documentation on interpolate with ``method=akima``. The ``der`` parameter must be scalar or ``None`` (:issue:`33426`)
10441044
- :meth:`DataFrame.interpolate` uses the correct axis convention now. Previously interpolating along columns lead to interpolation along indices and vice versa. Furthermore interpolating with methods ``pad``, ``ffill``, ``bfill`` and ``backfill`` are identical to using these methods with :meth:`DataFrame.fillna` (:issue:`12918`, :issue:`29146`)
10451045
- Bug in :meth:`DataFrame.interpolate` when called on a :class:`DataFrame` with column names of string type was throwing a ValueError. The method is now independent of the type of the column names (:issue:`33956`)

doc/source/whatsnew/v3.0.0.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ Groupby/resample/rolling
834834
- 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`)
835835
- 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`)
836836
- Bug in :meth:`Rolling.apply` where the applied function could be called on fewer than ``min_period`` periods if ``method="table"``. (:issue:`58868`)
837-
- Bug in :meth:`Series.resample` could raise when the the date range ended shortly before a non-existent time. (:issue:`58380`)
837+
- Bug in :meth:`Series.resample` could raise when the date range ended shortly before a non-existent time. (:issue:`58380`)
838838

839839
Reshaping
840840
^^^^^^^^^
@@ -852,6 +852,7 @@ Reshaping
852852
- Bug in :meth:`DataFrame.unstack` producing incorrect results when manipulating empty :class:`DataFrame` with an :class:`ExtentionDtype` (:issue:`59123`)
853853
- Bug in :meth:`concat` where concatenating DataFrame and Series with ``ignore_index = True`` drops the series name (:issue:`60723`, :issue:`56257`)
854854
- Bug in :func:`melt` where calling with duplicate column names in ``id_vars`` raised a misleading ``AttributeError`` (:issue:`61475`)
855+
- Bug in :meth:`DataFrame.merge` where user-provided suffixes could result in duplicate column names if the resulting names matched existing columns. Now raises a :class:`MergeError` in such cases. (:issue:`61402`)
855856

856857
Sparse
857858
^^^^^^

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: pandas-dev
33
channels:
44
- conda-forge
55
dependencies:
6-
- python=3.10
6+
- python=3.11
77
- pip
88

99
# build dependencies

meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ if cy.version().version_compare('>=3.1.0')
5757
command: [
5858
cy,
5959
'-3',
60+
'-Xfreethreading_compatible=true',
6061
'--fast-fail',
6162
'--generate-shared=' + meson.current_build_dir() / '_cyutility.c',
6263
],

pandas/_libs/tslibs/conversion.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ cdef int64_t parse_pydatetime(
797797
dts : *npy_datetimestruct
798798
Needed to use in pydatetime_to_dt64, which writes to it.
799799
creso : NPY_DATETIMEUNIT
800-
Resolution to store the the result.
800+
Resolution to store the result.
801801
802802
Raises
803803
------

pandas/core/arrays/categorical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ def __array__(
16661666
Parameters
16671667
----------
16681668
dtype : np.dtype or None
1669-
Specifies the the dtype for the array.
1669+
Specifies the dtype for the array.
16701670
16711671
copy : bool or None, optional
16721672
See :func:`numpy.asarray`.

pandas/core/reshape/merge.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,13 +3062,16 @@ def renamer(x, suffix: str | None):
30623062
if not llabels.is_unique:
30633063
# Only warn when duplicates are caused because of suffixes, already duplicated
30643064
# columns in origin should not warn
3065-
dups = llabels[(llabels.duplicated()) & (~left.duplicated())].tolist()
3065+
dups.extend(llabels[(llabels.duplicated()) & (~left.duplicated())].tolist())
30663066
if not rlabels.is_unique:
30673067
dups.extend(rlabels[(rlabels.duplicated()) & (~right.duplicated())].tolist())
3068+
# Suffix addition creates duplicate to pre-existing column name
3069+
dups.extend(llabels.intersection(right.difference(to_rename)).tolist())
3070+
dups.extend(rlabels.intersection(left.difference(to_rename)).tolist())
30683071
if dups:
30693072
raise MergeError(
30703073
f"Passing 'suffixes' which cause duplicate columns {set(dups)} is "
3071-
f"not allowed.",
3074+
"not allowed.",
30723075
)
30733076

30743077
return llabels, rlabels

0 commit comments

Comments
 (0)