title: How to spilt pandas series based on list of dates
body: <p>I have a pandas series with datetime index:</p>
  
  <pre><code>2020-06-09 10:20:00     1
  2020-06-09 10:25:00     2
  2020-06-09 10:30:00     3
  2020-06-09 10:35:00     4
  2020-06-09 10:40:00     5
  2020-06-09 10:45:00     6
  2020-06-09 10:50:00     7
  2020-06-09 10:55:00     8
  2020-06-09 11:00:00     9
  2020-06-09 11:05:00    10
  2020-06-09 11:10:00    11
  2020-06-09 11:15:00    12
  2020-06-09 11:20:00    13
  2020-06-09 11:25:00    14
  2020-06-09 11:30:00    15
  2020-06-09 11:35:00    16
  2020-06-09 11:40:00    17
  </code></pre>
  
  <p>And dataframe with date ranges:</p>
  
  <pre><code>    start                   end
  0   2020-06-09 10:21:00     2020-06-09 10:53:00
  1   2020-06-09 10:42:00     2020-06-09 10:58:00
  </code></pre>
  
  <p>I want to get a collection of values for all date ranges:</p>
  
  <pre><code>[
   [2,3,4,5,6,7],
   [6,7,8]
  ]
  </code></pre>
  
  <p>Is there a way to do this faster than iterating over the dataframe with dates like this:</p>
  
  <pre><code>for x in df.iterrows():
    series[(series.index &gt; x.start) &amp; (series.index &lt; x.end)]
  </code></pre>