Skip to content

Commit 9131eaf

Browse files
committed
Refinements
1 parent 982f317 commit 9131eaf

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ In cases with mixed-resolution inputs, the highest resolution is used:
380380
When all objects passed to :func:`concat` have a :class:`DatetimeIndex`,
381381
passing ``sort=False`` will now result in the non-concatenation axis not
382382
being sorted. Previously, the result would always be sorted along
383-
the non-concatenation axis even when ``sort=False`` is passed.
383+
the non-concatenation axis even when ``sort=False`` is passed. :issue:`57335`
384384

385385
If you do not specify the ``sort`` argument, pandas will continue to return a
386386
sorted result but this behavior is deprecated and you will receive a warning.

pandas/core/indexes/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def safe_sort_index(index: Index) -> Index:
182182
return index
183183

184184

185-
def union_indexes(indexes, sort: bool | None | lib.NoDefault = True) -> Index:
185+
def union_indexes(indexes, sort: bool | lib.NoDefault = True) -> Index:
186186
"""
187187
Return the union of indexes.
188188

pandas/core/reshape/concat.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,7 @@ def concat(
422422
intersect
423423
or any(not isinstance(index, DatetimeIndex) for index in non_concat_axis)
424424
or all(
425-
id(prev) == id(curr)
426-
for prev, curr in zip(non_concat_axis, non_concat_axis[1:])
425+
prev is curr for prev, curr in zip(non_concat_axis, non_concat_axis[1:])
427426
)
428427
or (
429428
all(

0 commit comments

Comments
 (0)