Skip to content

Commit b250bce

Browse files
tptopper-123
tp
authored andcommitted
changes according to comments
1 parent a012f4b commit b250bce

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pandas/core/groupby/generic.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
from pandas.core.index import Index, MultiIndex, CategoricalIndex
4747
from pandas.core.arrays.categorical import Categorical
4848
from pandas.core.internals import BlockManager, make_block
49-
from pandas.compat.numpy import _np_version_under1p13
5049

5150
from pandas.plotting._core import boxplot_frame_groupby
5251

@@ -1208,10 +1207,7 @@ def count(self):
12081207

12091208
mask = (ids != -1) & ~isna(val)
12101209
ids = ensure_platform_int(ids)
1211-
minlength = ngroups or 0
1212-
if _np_version_under1p13 and minlength == 0:
1213-
minlength = None
1214-
out = np.bincount(ids[mask], minlength=minlength)
1210+
out = np.bincount(ids[mask], minlength=ngroups or None)
12151211

12161212
return Series(out,
12171213
index=self.grouper.result_index,

0 commit comments

Comments
 (0)