File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 49
49
is_scalar ,
50
50
needs_i8_conversion ,
51
51
)
52
- from pandas .core .dtypes .missing import _isna_ndarraylike , isna , notna
52
+ from pandas .core .dtypes .missing import isna , notna
53
53
54
54
from pandas .core .aggregation import (
55
55
is_multi_agg_with_relabel ,
@@ -1772,10 +1772,8 @@ def count(self):
1772
1772
ids , _ , ngroups = self .grouper .group_info
1773
1773
mask = ids != - 1
1774
1774
1775
- vals = (
1776
- (mask & ~ _isna_ndarraylike (np .atleast_2d (blk .get_values ())))
1777
- for blk in data .blocks
1778
- )
1775
+ # TODO(2DEA): reshape would not be necessary with 2D EAs
1776
+ vals = ((mask & ~ isna (blk .values ).reshape (blk .shape )) for blk in data .blocks )
1779
1777
locs = (blk .mgr_locs for blk in data .blocks )
1780
1778
1781
1779
counted = (
You can’t perform that action at this time.
0 commit comments