Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ def _wrap_applied_output(self, keys, values, not_indexed_same=False):
return self.obj._constructor()
elif isinstance(first_not_none, DataFrame):
return self._concat_objects(keys, values, not_indexed_same=not_indexed_same)
elif self.grouper.groupings is not None:
else:
if len(self.grouper.groupings) > 1:
key_index = self.grouper.result_index

Expand Down Expand Up @@ -1373,10 +1373,6 @@ def _wrap_applied_output(self, keys, values, not_indexed_same=False):
# of columns
return self.obj._constructor_sliced(values, index=key_index)

else:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @FollowTheProcess - while you're here, can you change the elif in line 1221 to else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry yep, will do this and the xref now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's now done :) Thanks for helping me contribute (in an albeit microscopic way) the contributing docs made it super easy as a newbie. I hope to be able to contribute more as I learn more.

# Handle cases like BinGrouper
return self._concat_objects(keys, values, not_indexed_same=not_indexed_same)

def _transform_general(
self, func, *args, engine="cython", engine_kwargs=None, **kwargs
):
Expand Down