Skip to content

Commit d2aa496

Browse files
committed
Review (jreback)
1 parent b0133b0 commit d2aa496

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6514,7 +6514,7 @@ def _join_compat(self, other, on=None, how='left', lsuffix='', rsuffix='',
65146514
if can_concat:
65156515
if how == 'left':
65166516
res = concat(frames, axis=1, join='outer',
6517-
verify_integrity=True, copy=False)
6517+
verify_integrity=True)
65186518
res = res.reindex(self.index, copy=False)
65196519
return res
65206520
else:

pandas/core/generic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8930,8 +8930,8 @@ def describe_1d(data):
89308930
if name not in names:
89318931
names.append(name)
89328932

8933-
d = pd.concat([x.reindex(names) for x in ldesc], axis=1,
8934-
sort=False, copy=False)
8933+
d = pd.concat([x.reindex(names, copy=False) for x in ldesc],
8934+
axis=1, sort=False)
89358935
d.columns = data.columns.copy()
89368936
return d
89378937

pandas/core/groupby/generic.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,7 @@ def _transform_general(self, func, *args, **kwargs):
519519

520520
concat_index = obj.columns if self.axis == 0 else obj.index
521521
other_axis = 1 if self.axis == 0 else 0 # switches between 0 & 1
522-
concatenated = concat(applied, axis=self.axis,
523-
verify_integrity=False, copy=False)
522+
concatenated = concat(applied, axis=self.axis, verify_integrity=False)
524523
concatenated = concatenated.reindex(concat_index, axis=other_axis,
525524
copy=False)
526525
return self._set_result_index_ordered(concatenated)

pandas/core/reshape/concat.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False,
227227
res = op.get_result()
228228

229229
if join_axes is not None:
230+
# GH 21951
230231
warnings.warn('The join_axes-keyword is deprecated. Use .reindex or '
231232
'.reindex_like on the result to achieve the same '
232233
'functionality.', FutureWarning, stacklevel=2)
@@ -236,12 +237,12 @@ def concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False,
236237
"length {length}".format(length=ndim - 1))
237238
if ndim == 2:
238239
other_axis = 1 if axis == 0 else 0 # switches between 0 & 1
239-
res = res.reindex(join_axes[0], axis=other_axis)
240+
res = res.reindex(join_axes[0], axis=other_axis, copy=False)
240241
elif ndim == 3: # Panel
241242
other_axes = list(range(res.ndim))
242243
other_axes.pop(axis)
243244
for i in range(ndim - 1):
244-
res.reindex(join_axes[i], axis=i)
245+
res.reindex(join_axes[i], axis=i, copy=False)
245246
return res
246247

247248

0 commit comments

Comments
 (0)