Closed
Description
NOTE: I'd originally opened a PR to address this, but am now busy with other obligations + other PRs to respond to. So I'm opening it up as a good first issue for now, and will return to work on it if nobody takes it.
In pandas/core/groupby/generic.py::DataFrameGroupBy::_wrap_applied_output
, it seems this branch is never reached:
else:
# Handle cases like BinGrouper
return self._concat_objects(keys, values, not_indexed_same=not_indexed_same)
Two things need to be done here:
- refactor
_wrap_applied_output
by making a helper function out of some of its internals (it's currently very long, and changes are hard to review) - Remove this unused
else
branch