    :return:            The cleaned time series</span>
<span class="sd">    :rtype:             pd.DataFrame</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="c1"># Find the upper and lower bounds</span>
    <span class="n">upper</span> <span class="o">=</span> <span class="n">df</span><span class="o">.</span><span class="n">price</span><span class="o">.</span><span class="n">mean</span><span class="p">()</span> <span class="o">+</span> <span class="n">n_std</span> <span class="o">*</sp