title: Normalize values in data frame given unsorted other constraints
body: <p>I have a data frame that looks like this:</p>
  
  <pre><code>            counter leg_rate pose_rate component    approach      rmse
  0   proc/stat-stime        d         d      test    Baseline  1.583097
  1   proc/stat-stime        d         r      test  AEW - MTEN  0.516108
  2   proc/stat-stime        d         d      test        ASDF  0.705861
  3   proc/stat-stime        r         r      test        ASDF  0.345816
  4   proc/stat-utime        d         r      test    Baseline  1.128632
  5   proc/stat-stime        d         r      test    Baseline  1.579803
  6   proc/stat-stime        r         r      test    Baseline  1.345895
  7   proc/stat-utime        r         r      test  AEW - MTEN  0.187236
  8   proc/stat-utime        d         d      test    Baseline  1.193776
  9   proc/stat-stime        r         d      test        ASDF  0.014975
  10  proc/stat-utime        r         r      test        ASDF  0.985493
  11  proc/stat-utime        r         d      test  AEW - MTEN  0.897336
  12  proc/stat-stime        r         d      test    Baseline  1.415103
  13  proc/stat-utime        r         d      test    Baseline  1.724266
  14  proc/stat-utime        r         r      test    Baseline  1.294654
  15  proc/stat-utime        d         d      test  AEW - MTEN  0.263845
  16  proc/stat-utime        r         d      test        ASDF  0.497368
  17  proc/stat-stime        d         d      test  AEW - MTEN  0.143402
  18  proc/stat-utime        d         r      test  AEW - MTEN  0.233437
  19  proc/stat-stime        r         d      test  AEW - MTEN  0.431739
  20  proc/stat-utime        d         r      test        ASDF  0.002475
  21  proc/stat-stime        d         r      test        ASDF  0.331700
  22  proc/stat-stime        r         r      test  AEW - MTEN  0.985123
  23  proc/stat-utime        d         d      test        ASDF  0.464989
  </code></pre>
  
  <p>I want to normalize <code>rmse</code> by dividing it with the values from the <code>approach</code> called <code>Baseline</code>. In the end there should be a new column <code>rmse-norm</code> with the respective normalized values. All other columns basically provide a context that needs to be matched when dividing <code>rmse</code>. That means the row</p>
  
  <pre><code>1   proc/stat-stime        d         r      test  AEW - MTEN  0.516108
  </code></pre>
  
  <p>needs to be divided by the row with matching other columns</p>
  
  <pre><code>5   proc/stat-stime        d         r      test    Baseline  1.579803
  </code></pre>
  
  <p>There will always be a matching row from the <code>Baseline</code> approach.</p>
  
  <p>I have tried various things with <code>groupby</code> and using indexes for the other columns, but due to the unknown ordering of columns I couldn't come up with something concise that assigns the correct values with the right ordering.</p>