Skip to content

Commit fe2f0ec

Browse files
committed
Treat incomplete group keys as distinct when shifting
1 parent 966d5c6 commit fe2f0ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pandas/src/algos_groupby_helper.pxi

+1
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,7 @@ def group_shift_indexer(int64_t[:] out, int64_t[:] labels,
13591359

13601360
# Skip null keys
13611361
if lab == -1:
1362+
out[ii] = -1
13621363
continue
13631364

13641365
label_seen[lab] += 1

0 commit comments

Comments
 (0)