Skip to content

Commit d9122d4

Browse files
committed
Fix warnings
1 parent 8776d4b commit d9122d4

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

pandas/core/frame.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6508,11 +6508,11 @@ def _join_compat(self, other, on=None, how='left', lsuffix='', rsuffix='',
65086508
if can_concat:
65096509
if how == 'left':
65106510
how = 'outer'
6511-
join_axes = [self.index]
6511+
return concat(frames, axis=1, join=how,
6512+
verify_integrity=True).reindex(self.index)
65126513
else:
6513-
join_axes = None
6514-
return concat(frames, axis=1, join=how, join_axes=join_axes,
6515-
verify_integrity=True)
6514+
return concat(frames, axis=1, join=how,
6515+
verify_integrity=True)
65166516

65176517
joined = frames[0]
65186518

pandas/core/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8931,7 +8931,7 @@ def describe_1d(data):
89318931
if name not in names:
89328932
names.append(name)
89338933

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

pandas/core/groupby/generic.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,10 @@ def _transform_general(self, func, *args, **kwargs):
518518
applied.append(res)
519519

520520
concat_index = obj.columns if self.axis == 0 else obj.index
521-
concatenated = concat(applied, join_axes=[concat_index],
522-
axis=self.axis, verify_integrity=False)
521+
other_axis = (self.axis + 1) % 2 # switches from 0 to 1 or from 1 to 0
522+
concatenated = concat(applied, axis=self.axis,
523+
verify_integrity=False).reindex(concat_index,
524+
axis=other_axis)
523525
return self._set_result_index_ordered(concatenated)
524526

525527
@Substitution(klass='DataFrame', selected='')

0 commit comments

Comments
 (0)