Lets say we have the following dataframe. If we wanted to find the count of consecutive 1\'s, you could use the below.
col 0 0 1 1 2 1 3 1 4 0 5 0