">groupby</span><span class="p">(</span><span class="n">g</span><span class="p">)</span><span class="o">.</span><span class="n">count</span><span class="p">()</span>

        <span class="c1"># g contains a group index for each member of out, and here</span>
        <span class="c1"># we map g to out which has cumulative time</span>
        <span class="n">tsout</span> <span class="o">=</span> <span class="n">g</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="n">c