an><span class="n">c</span><span class="p">]</span><span class="o">.</span><span class="n">isna</span><span class="p">()</span>
        <span class="c1"># create consecutive groups that increment each time the &quot;is missing state&quot; (na or not na) changes</span>
        <span class="n">g</span> <span class="o">=</span> <span class="n">miss</span><span class="o">.</span><span class="n">ne</span><span class="p">(</span><span class="n">miss</span><span class="o">.</span><span class="n">shift</span><span 