I'm working on a df with 2 columns e.g.
column1 = [False, False, False, True, False, False, True]
column2 = [1, 1, 1, 1, 1, 1, 1]
I want to sum all "False" values until the first "True" value, and again sum the following "False" values until the next "True" etc.
The output should be
column3 = [0,0,0,3,0,0,2]
I tried to sum column values but I can't "reset" the counter once hitting a "True" from a different column