title: Loops in scala between rows
body: <p>I have something like this :</p>
  <pre><code>NonWorkingDays =Seq((&quot;2021-01-01&quot;),(&quot;2021-01-02&quot;),(&quot;2021-01-03&quot;),(&quot;2021-01-06&quot;),(&quot;2021-01-09&quot;),
                      (&quot;2021-01-10&quot;),(&quot;2021-01-16&quot;),(&quot;2021-01-17&quot;),(&quot;2021-01-23&quot;),(&quot;2021-01-24&quot;),
                      (&quot;2021-01-30&quot;),(&quot;2021-01-31&quot;)).toDF(&quot;festivos&quot;)
  </code></pre>
  <p>df :</p>
  <pre><code>|Starts     |  End     |Resta|
  +-----------+----------+-----+
  | 2021-01-04|2021-01-05|    1|
  | 2021-01-11|2021-01-14|    3|
  +-----------+----------+-----+
  </code></pre>
  <p>how can I do a loop between Starts &gt; End ? I mean something like :</p>
  <pre><code>for (a &lt;- &quot;2021-01-04&quot; to &quot;2021-01-10&quot;) println(a)
  </code></pre>