Skip to content

Commit 2fee99a

Browse files
committed
GH#24845
1 parent 9c868fa commit 2fee99a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pandas/core/generic.py

-2
Original file line numberDiff line numberDiff line change
@@ -4440,11 +4440,9 @@ def sort_index(
44404440
inplace = validate_bool_kwarg(inplace, "inplace")
44414441
axis = self._get_axis_number(axis)
44424442
target = self._get_axis(axis)
4443-
44444443
indexer = get_indexer_indexer(
44454444
target, level, ascending, kind, na_position, sort_remaining, key
44464445
)
4447-
44484446
if indexer is None:
44494447
if inplace:
44504448
return

pandas/core/reshape/concat.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ def __init__(
386386
):
387387
objs = non_empties
388388
sample = objs[0]
389-
390389
if sample is None:
391390
sample = objs[0]
392391
self.objs = objs
@@ -502,12 +501,12 @@ def get_result(self):
502501
obj_labels = obj.axes[1 - ax]
503502
if not new_labels.equals(obj_labels):
504503
indexers[ax] = obj_labels.reindex(new_labels)[1]
505-
506504
mgrs_indexers.append((obj._mgr, indexers))
507505

508506
new_data = concatenate_block_managers(
509507
mgrs_indexers, self.new_axes, concat_axis=self.bm_axis, copy=self.copy
510508
)
509+
511510
if not self.copy:
512511
new_data._consolidate_inplace()
513512

@@ -578,13 +577,13 @@ def _get_concat_axis(self) -> Index:
578577

579578
if self.keys is None:
580579
concat_axis = _concat_indexes(indexes)
580+
581581
else:
582582
concat_axis = _make_concat_multiindex(
583583
indexes, self.keys, self.levels, self.names
584584
)
585585

586586
self._maybe_check_integrity(concat_axis)
587-
588587
return concat_axis
589588

590589
def _maybe_check_integrity(self, concat_index: Index):

0 commit comments

Comments
 (0)