title: resample data to match with timestamp based on another variable
body: <p>I have data that is in the following form:</p>
  <pre><code>Name   Value  Timetag                 
  a      1    2020-07-31 00:22:00.000
  a      2    2020-07-31 00:24:00.000 
  b      1      2020-07-31 00:22:00.000
  b      8      2020-07-31 00:23:00.000 
  total  20     2020-07-31 00:20:00.000 
  total  25     2020-07-31 00:30:00.000
  </code></pre>
  <p>And what I need is to have all the values in the same resolution that in total. So for that I need to resample the <code>Timetag</code> column when <code>Name</code> is not <code>total</code> so that it matches to when it is <code>total</code>. What I want to achieve next is to pivot the table and not have missing values and also to reduce the amount of rows on my dataframe. So, the result would look like this:</p>
  <pre><code> Name   Value  Timetag                 
   a      1.3    2020-07-31 00:20:00.000 
   a      2.5    2020-07-31 00:30:00.000 
   b      2      2020-07-31 00:20:00.000 
   b      6      2020-07-31 00:30:00.000 
   total  20     2020-07-31 00:20:00.000 
   total  25     2020-07-31 00:30:00.000 
  </code></pre>
  <p>Where <code>Value</code> of <code>a</code> and <code>b</code> would be obtained by the mean of its values between time gap between one value of <code>total</code> and the next one if you order by date f.x. the values that are in the range: [2020-07-31 00:20:00.000,2020-07-31 00:30:00.000)</p>
  <p>Thank you!</p>