Increase same valued data consecutively if occurs more than once

have a look here:

we can solve it by groupby