title: Performing calculations on Dataframe columns by user and add as new column
body: <p>Here is my current DF:</p>
  
  <p>DF:</p>
  
  <pre><code><b> User        time   distance</b>
   Jeff    00:04:00      10
   Mike    00:01:00       2
   Mike    00:05:00       4
   Jeff    00:08:00       4</code></pre>
  
  <p>I'm looking to add two new columns - avgtime and avg velocity (distance/time). The avg time and avg vel is calculated for each user and then result is shown in each dataframe record - where the results look like this:</p>
  
  <p>Desired_DF:</p>
  
  <pre><code><b> User    time    distance   avg_time   avg_vel</b>
   Jeff    00:04:00    10      00:06:00     1.5
   Mike    00:01:00     2      00:03:00     1.4
   Mike    00:05:00     4      00:03:00     1.4
   Jeff    00:08:00     4      00:06:00     1.5</code></pre>