Count number of rows between filled values in python dataframe
<p>I'm still pretty new to pandas. I would like to count the number of rows with zero values up to the next row with a value in it. So for example, I would like to take a dataframe that looks like this:</p>

<pre><code>id   Distance
00   0   
01   0   
02   0   
03   0   
04   0   
05   10   
06   0   
07   0   
08   0   
09   0   
10   16   
11   0   
12   0   
13   6
</code></pre>

<p>and have it be transformed into this:</p>

<pre><code>id    Distance     count
05    10            6
10    16            6
13    6             3
</code></pre>

<p>thanks</p>