t; this is the number of values. If dist_type=&quot;freq&quot; it is in the units of ts.freq</span>
<span class="sd">    (so if freq == &quot;15min&quot; it is in minutes&quot;)</span>

<span class="sd">    to : `str` one of &#39;bad&#39;|&#39;good&#39;</span>

<span class="sd">    If to = &quot;good&quot; this is the distance to the nearest good data (which is 0 for good data).</span>
<span class="sd">    If to = &quot;bad&quot;, this is the distance to the nearest nan (which is 0 for nan).</span>

<span c