0

I am trying to create an incremental column that increments based on the same id from another column. My dataset consists of 300K rows. This is the input.

id
a
a
b
c
c
c

Expected output

id    count
a       1
a       2
b       1
c       1
c       2
c       3

How do I go about doing this?

0 Answers0