Skip to content

Commit 58992f5

Browse files
committed
REF/CLN (feedback): remove min_count arg from libgroupby.group_nth
1 parent a48ddaa commit 58992f5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas/_libs/groupby.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,8 +986,8 @@ def group_last(rank_t[:, :] out,
986986
def group_nth(rank_t[:, :] out,
987987
int64_t[:] counts,
988988
ndarray[rank_t, ndim=2] values,
989-
const int64_t[:] labels, int64_t rank=1,
990-
Py_ssize_t min_count=-1):
989+
const int64_t[:] labels, int64_t rank=1
990+
):
991991
"""
992992
Only aggregates on axis=0
993993
"""
@@ -997,6 +997,7 @@ def group_nth(rank_t[:, :] out,
997997
ndarray[rank_t, ndim=2] resx
998998
ndarray[int64_t, ndim=2] nobs
999999
bint runtime_error = False
1000+
Py_ssize_t min_count = -1
10001001

10011002
assert min_count == -1, "'min_count' only used in add and prod"
10021003

pandas/core/groupby/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def _aggregate(
603603
):
604604
if agg_func is libgroupby.group_nth:
605605
# different signature from the others
606-
agg_func(result, counts, values, comp_ids, rank=1, min_count=min_count)
606+
agg_func(result, counts, values, comp_ids, rank=1)
607607
else:
608608
agg_func(result, counts, values, comp_ids, min_count)
609609

0 commit comments

Comments
 (0)