title: Getting preceding and following datetime from a pandas dataframe
body: <p>I have a dataframe like below showing time, subject and on_time.</p>
  <pre><code>    created_time       subject          on_time
  2020-02-26 21:01:40      A        2020-02-26 21:08:40
  2020-02-26 21:01:40      A        2020-02-26 21:01:43
  2020-02-26 21:01:40      A        2020-02-26 20:50:55
  2020-02-26 21:01:40      A        2020-02-26 21:44:40
  2020-02-26 01:01:50      B        2020-02-26 01:01:52
  2020-02-26 01:01:50      B        2020-02-26 00:08:40
  2020-02-26 01:01:50      B        2020-02-26 01:08:40
  2020-02-26 01:01:50      B        2020-02-26 00:59:15
  </code></pre>
  <p>I need output dataframe showcasing the created_time, subject and on_time just preceding and just following the created_time like</p>
  <pre><code>    created_time       subject     on_time_preceding     on_time_following
  2020-02-26 21:01:40      A        2020-02-26 21:44:40   2020-02-26 21:01:43
  2020-02-26 01:01:50      B        2020-02-26 00:59:15   2020-02-26 01:01:52
  </code></pre>
  <p>on_time_preceding is the nearest preceding on_time just before the created_time and on_time_following is the nearest following on_time just after the created_time</p>