Consecutive count of binary column by group
I am attempting to create a ‘counter’ of consecutive binary values = 1, resetting when the binary value = 0, for each group. Example of data:
I am attempting to create a ‘counter’ of consecutive binary values = 1, resetting when the binary value = 0, for each group. Example of data: