title: Invert time on given date in dataframe
body: <p>For a dataframe containing start and end times I would like to "invert" it's times for a given date. There certainly is a "brute force" method to do it by looping through the dataframe and having a lot of if conditions, but I wonder if there is a more elegant way, like with backfill/forwardfill.</p>
  
  <p>Consider it as having a dataframe where working hours are represented by rows with start and end time and what I ultimately want is the freetime of this date.
  The dataframe is ordered in monotonic increasing start times and has cut offs at date change, so a time starting at e.g. 2019-04-04 22:00 and ending at 2019-04-05 04:00 is represented by two rows 2019-04-04 22:00 to 2019-04-05 00:00 and 2019-04-05 00:00 to 2019-04-05 04:00. This should make the problem easier.</p>
  
  <p>Code for an example:</p>
  
  <pre><code>import pandas as pd
  import datetime
  
  df = pd.DataFrame({'date': [datetime.date(2019, 4, 4), datetime.date(2019, 4, 5), datetime.date(2019, 4, 5)],
                     'start': [pd.Timestamp(2019, 4, 4, 10), pd.Timestamp(2019, 4, 5, 0), pd.Timestamp(2019, 4, 5, 14)],
                     'end': [pd.Timestamp(2019, 4, 4, 16), pd.Timestamp(2019, 4, 5, 4), pd.Timestamp(2019, 4, 5, 18)]})
  </code></pre>
  
  <p>So starting from this:</p>
  
  <pre><code>2019-04-04   2019-04-04 10:00:00   2019-04-04 16:00:00
  2019-04-05   2019-04-05 00:00:00   2019-04-05 04:00:00
  2019-04-05   2019-04-05 14:00:00   2019-04-05 18:00:00
  
  </code></pre>
  
  <p>I would expect the result to be a dataframe like this:</p>
  
  <pre><code>2019-04-04   2019-04-04 00:00:00   2019-04-04 10:00:00
  2019-04-04   2019-04-04 16:00:00   2019-04-05 00:00:00
  2019-04-05   2019-04-05 04:00:00   2019-04-05 14:00:00
  2019-04-05   2019-04-05 18:00:00   2019-04-06 00:00:00
  
  </code></pre>
  
  <p>Any help is much appreciated.</p>