Skip to content

Commit 97ead75

Browse files
author
tp
committed
changes according to comments
1 parent d65615b commit 97ead75

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/core/groupby/generic.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1208,9 +1208,7 @@ def count(self):
12081208

12091209
mask = (ids != -1) & ~isna(val)
12101210
ids = ensure_platform_int(ids)
1211-
minlength = ngroups or 0
1212-
if _np_version_under1p13 and minlength == 0:
1213-
minlength = None
1211+
minlength = ngroups or (None if _np_version_under1p13 else 0)
12141212
out = np.bincount(ids[mask], minlength=minlength)
12151213

12161214
return Series(out,

0 commit comments

Comments
 (0)