title: How to calculate difference for only first value in a group?
body: <p>I have a pandas dataframe</p>
  
  <pre><code>ticket num loadtype   start                   diff                       end                                        
  2       1   FIRST   12/28/18 7:40 PM    0 days 06:05:48.928732000   12/29/18 1:45 AM
  2       2   MIDDLE  12/28/18 7:40 PM    0 days 09:21:17.652138000   12/29/18 5:01 AM
  2       3   LAST    12/28/18 7:40 PM    0 days 13:11:39.585263000   12/29/18 8:51 AM
  4 .     4 . FIRST   12/29/18 7:00 AM .  1 days 00:00:00.000000000   12/30/18 7:00 AM
  </code></pre>
  
  <p>The dataframe is grouped by 'ticket', which has multiple loads. I want to only calculate the difference between end and start for the FIRST load of each ticket, and persist that through all the rest of the loads for that ticket. </p>
  
  <p>So I want</p>
  
  <pre><code>ticket num loadtype   start                   diff                       end                                        
  2      1    FIRST   12/28/18 7:40 PM    0 days 06:05:48.928732000   12/29/18 1:45 AM
  2      2    MIDDLE  12/28/18 7:40 PM    0 days 06:05:48.928732000   12/29/18 5:01 AM
  2      3    LAST    12/28/18 7:40 PM    0 days 06:05:48.928732000   12/29/18 8:51 AM
  4 .    4 .  FIRST   12/29/18 7:00 AM .  1 days 00:00:00.000000000   12/30/18 7:00 AM 
  </code></pre>
  
  <p>How would I do this in pandas? Would I have to use a groupby followed by an apply of some sort?</p>