Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pandas/_libs/groupby.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ def group_last(rank_t[:, :] out,

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

if not len(values) == len(labels):
if not len(values) == labels.shape[0]:
raise AssertionError("len(index) != len(labels)")

nobs = np.zeros((<object>out).shape, dtype=np.int64)
Expand Down Expand Up @@ -960,7 +960,7 @@ def group_nth(rank_t[:, :] out,

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

if not len(values) == len(labels):
if not len(values) == labels.shape[0]:
raise AssertionError("len(index) != len(labels)")

nobs = np.zeros((<object>out).shape, dtype=np.int64)
Expand Down Expand Up @@ -1254,7 +1254,7 @@ def group_max(groupby_t[:, :] out,

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

if not len(values) == len(labels):
if not len(values) == labels.shape[0]:
raise AssertionError("len(index) != len(labels)")

nobs = np.zeros((<object>out).shape, dtype=np.int64)
Expand Down Expand Up @@ -1327,7 +1327,7 @@ def group_min(groupby_t[:, :] out,

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

if not len(values) == len(labels):
if not len(values) == labels.shape[0]:
raise AssertionError("len(index) != len(labels)")

nobs = np.zeros((<object>out).shape, dtype=np.int64)
Expand Down