Skip to content

Commit dbb489d

Browse files
committed
Fix warnings
1 parent 6047a8c commit dbb489d

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
@@ -6614,11 +6614,11 @@ def _join_compat(self, other, on=None, how='left', lsuffix='', rsuffix='',
66146614
if can_concat:
66156615
if how == 'left':
66166616
how = 'outer'
6617-
join_axes = [self.index]
6617+
return concat(frames, axis=1, join=how,
6618+
verify_integrity=True).reindex(self.index)
66186619
else:
6619-
join_axes = None
6620-
return concat(frames, axis=1, join=how, join_axes=join_axes,
6621-
verify_integrity=True)
6620+
return concat(frames, axis=1, join=how,
6621+
verify_integrity=True)
66226622

66236623
joined = frames[0]
66246624

pandas/core/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8848,7 +8848,7 @@ def describe_1d(data):
88488848
if name not in names:
88498849
names.append(name)
88508850

8851-
d = pd.concat(ldesc, join_axes=pd.Index([names]), axis=1)
8851+
d = pd.concat([x.reindex(names) for x in ldesc], axis=1, sort=False)
88528852
d.columns = data.columns.copy()
88538853
return d
88548854

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)