File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 16
16
Callable ,
17
17
FrozenSet ,
18
18
Iterable ,
19
- List ,
20
19
Mapping ,
21
20
Sequence ,
22
21
Type ,
@@ -1697,7 +1696,7 @@ def _wrap_transformed_output(
1697
1696
1698
1697
return result
1699
1698
1700
- def _wrap_agged_blocks (self , blocks : "List [Block]" , items : Index ) -> DataFrame :
1699
+ def _wrap_agged_blocks (self , blocks : "Sequence [Block]" , items : Index ) -> DataFrame :
1701
1700
if not self .as_index :
1702
1701
index = np .arange (blocks [0 ].values .shape [- 1 ])
1703
1702
mgr = BlockManager (blocks , axes = [items , index ])
@@ -1752,9 +1751,9 @@ def count(self):
1752
1751
)
1753
1752
locs = (blk .mgr_locs for blk in data .blocks )
1754
1753
1755
- counted = [
1754
+ counted = (
1756
1755
lib .count_level_2d (x , labels = ids , max_bin = ngroups , axis = 1 ) for x in vals
1757
- ]
1756
+ )
1758
1757
blocks = [make_block (val , placement = loc ) for val , loc in zip (counted , locs )]
1759
1758
1760
1759
return self ._wrap_agged_blocks (blocks , items = data .items )
You can’t perform that action at this time.
0 commit comments