Skip to content

Commit e9e6b56

Browse files
committed
minor cleanups
1 parent 569cfa7 commit e9e6b56

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/core/groupby/generic.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
Callable,
1717
FrozenSet,
1818
Iterable,
19-
List,
2019
Mapping,
2120
Sequence,
2221
Type,
@@ -1697,7 +1696,7 @@ def _wrap_transformed_output(
16971696

16981697
return result
16991698

1700-
def _wrap_agged_blocks(self, blocks: "List[Block]", items: Index) -> DataFrame:
1699+
def _wrap_agged_blocks(self, blocks: "Sequence[Block]", items: Index) -> DataFrame:
17011700
if not self.as_index:
17021701
index = np.arange(blocks[0].values.shape[-1])
17031702
mgr = BlockManager(blocks, axes=[items, index])
@@ -1752,9 +1751,9 @@ def count(self):
17521751
)
17531752
locs = (blk.mgr_locs for blk in data.blocks)
17541753

1755-
counted = [
1754+
counted = (
17561755
lib.count_level_2d(x, labels=ids, max_bin=ngroups, axis=1) for x in vals
1757-
]
1756+
)
17581757
blocks = [make_block(val, placement=loc) for val, loc in zip(counted, locs)]
17591758

17601759
return self._wrap_agged_blocks(blocks, items=data.items)

0 commit comments

Comments
 (0)