Skip to content

Commit

Permalink
Code update - swap group_index.take with grouper
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Feb 23, 2018
1 parent 5e6d811 commit 422c0f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pandas/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -4649,8 +4649,7 @@ def _fill(self, direction, limit=None):
"""Overriden method to join grouped columns in output"""
res = super(DataFrameGroupBy, self)._fill(direction, limit=limit)
output = collections.OrderedDict(
(grp.name, grp.group_index.take(grp.labels)) for grp in
self.grouper.groupings)
(grp.name, grp.grouper) for grp in self.grouper.groupings)

from pandas.core.reshape.concat import concat
return concat((self._wrap_transformed_output(output), res), axis=1)
Expand Down

0 comments on commit 422c0f3

Please sign in to comment.