diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 052952103e28c3..11d831bb0bad93 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6508,11 +6508,11 @@ def _join_compat(self, other, on=None, how='left', lsuffix='', rsuffix='', if can_concat: if how == 'left': how = 'outer' - join_axes = [self.index] + return concat(frames, axis=1, join=how, + verify_integrity=True).reindex(self.index) else: - join_axes = None - return concat(frames, axis=1, join=how, join_axes=join_axes, - verify_integrity=True) + return concat(frames, axis=1, join=how, + verify_integrity=True) joined = frames[0] diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 0e5204fcd65245..6b84c02de3e1ce 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -8931,7 +8931,7 @@ def describe_1d(data): if name not in names: names.append(name) - d = pd.concat(ldesc, join_axes=pd.Index([names]), axis=1) + d = pd.concat([x.reindex(names) for x in ldesc], axis=1, sort=False) d.columns = data.columns.copy() return d diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py index 685635fb6854dc..7c64c8d9424ca7 100644 --- a/pandas/core/groupby/generic.py +++ b/pandas/core/groupby/generic.py @@ -518,8 +518,10 @@ def _transform_general(self, func, *args, **kwargs): applied.append(res) concat_index = obj.columns if self.axis == 0 else obj.index - concatenated = concat(applied, join_axes=[concat_index], - axis=self.axis, verify_integrity=False) + other_axis = (self.axis + 1) % 2 # switches from 0 to 1 or from 1 to 0 + concatenated = concat(applied, axis=self.axis, + verify_integrity=False).reindex(concat_index, + axis=other_axis) return self._set_result_index_ordered(concatenated) @Substitution(klass='DataFrame', selected='')