I m new to pandas, and need the following : my DataFrame looks like
'a' 'b'
S1 4
S1 7
S2 1
S2 3
S2 9
S1 4
I d like to group it by column a, but grouping only subsequent lines, so the result of calling count on the groupby would get me something like
S1 2
S2 3
S1 1
Is there an option or another function to achieve this ? Thanks