">    </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    For each element of ts, count the distance to the nearest good data/or bad data.</span>

<span class="sd">    Parameters</span>
<span class="sd">    ----------</span>

<span class="sd">    ts : :class:`DataFrame &lt;pandas:pandas.DataFrame&gt;`</span>
<span class="sd">    Time series to analyze</span>

<span class="sd">    disttype : `str` one of &#39;bad&#39;|&#39;good&#39;</span>
<span class="sd">    If disttype = &quot;count&quo