diff --git a/pandas/core/frame.py b/pandas/core/frame.py index a57caa68ce7382..c885b54356c495 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -361,7 +361,8 @@ `right` should be left as-is, with no suffix. At least one of the values must not be None. copy : bool, default True - If False, avoid copy if possible. + If False, avoid copy if possible. If CoW is used, then the copy will be set + to False. If merge finally work on axis 0, then copy operation may be needed. indicator : bool or str, default False If True, adds a column to the output DataFrame called "_merge" with information on the source of each row. The column can be given a different diff --git a/pandas/core/internals/concat.py b/pandas/core/internals/concat.py index 4d33f0137d3c43..fcda794fadfad2 100644 --- a/pandas/core/internals/concat.py +++ b/pandas/core/internals/concat.py @@ -186,7 +186,7 @@ def concatenate_managers( fastpath = blk.values.dtype == values.dtype else: - values = _concatenate_join_units(join_units, copy=copy) + values = _concatenate_join_units(join_units) fastpath = False if fastpath: @@ -454,7 +454,7 @@ def get_reindexed_values(self, empty_dtype: DtypeObj, upcasted_na) -> ArrayLike: return self.block.values -def _concatenate_join_units(join_units: list[JoinUnit], copy: bool) -> ArrayLike: +def _concatenate_join_units(join_units: list[JoinUnit]) -> ArrayLike: """ Concatenate values from several join units along axis=1. """ diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index f6aedcbd67cba9..f370f04f927571 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -628,7 +628,6 @@ def get_result(self): # stack blocks if self.bm_axis == 0: name = com.consensus_name_attr(self.objs) - cons = sample._constructor arrs = [ser._values for ser in self.objs]