Skip to content

Commit 60a17bb

Browse files
committed
Fixed issue with reconstructing grouped Series
1 parent 4d5bd65 commit 60a17bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/groupby.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1463,8 +1463,9 @@ def _fill(self, how, limit=None):
14631463
limit = -1
14641464
output = {}
14651465
if type(self) is DataFrameGroupBy:
1466-
for nm in self.grouper.names:
1467-
output[nm] = self.obj[nm].values
1466+
for grp in self.grouper.groupings:
1467+
ser = grp.group_index.take(grp.labels)
1468+
output[ser.name] = ser.values
14681469
for name, obj in self._iterate_slices():
14691470
indexer = np.zeros_like(labels)
14701471
mask = isnull(obj.values).view(np.uint8)

0 commit comments

Comments
 (0)