I want to count the number of zeros after every batch of non-zero numbers in a dataframe. For example, see this dataframe. The number of zeros in column A after the first non-zero cluster is 2. Then after the next cluster, the number of zeros is 4 and after the final cluster the number of zeros is 2. So the output should be [2,4,2].
Time A B C
60 5 4 3
120 4 5 2
180 5 5 5
240 0 0 0
300 0 0 0
360 6 7 8
420 5 6 7
480 0 0 0
540 0 0 0
600 0 0 0
660 0 0 0
720 5 6 6
780 5 6 6
840 0 0 0
900 0 0 0