title: Operations between two rows of a dataframe with the same index
body: <p>I have a df1 that looks like this:</p>
  
  <pre><code>intakeNo           1          2          3           4           5   
  intakeDate  3/21/1978  4/28/1979  1/11/1981  11/10/1982   12/9/1983   
  intakeAmt     9.3E-04    5.1E-02    2.4E-04     3.5E-02     1.1E-02   
  intakeSD      2.2E-02    7.7E-01    5.8E-03     1.0E+00     1.7E-01   
  incident            F          F          F           F           F   
  is5           0.24209    0.20829    0.21810     0.20720     0.22137   
  gim           0.00000    0.00000    0.00000     0.00000     0.00000 
  </code></pre>
  
  <p>, and a df2 that looks like this:</p>
  
  <pre><code>intakeDate  3/19/1978   5/6/1979   1/3/1981   11/9/1982  11/26/1983   
  intakeAmt     3.2E-02    1.9E-02    4.7E-03     2.0E-02     4.9E-03   
  intakeSD      9.6E-01    5.3E-01    1.4E-01     5.6E-01     9.4E-02   
  incident            F          F          F           F           F   
  is5           0.23315    0.18674    0.21878     0.21105     0.23536 
  gim           0.00000    0.00000    0.00000     0.00000     0.00000   
  </code></pre>
  
  <p>I concatenated the two dataframes using </p>
  
  <pre><code>pandas.concat([df1, df2])
  </code></pre>
  
  <p>to get</p>
  
  <pre><code>intakeNo           1          2          3           4           5   
  intakeDate  3/21/1978  4/28/1979  1/11/1981  11/10/1982   12/9/1983   
  intakeAmt     9.3E-04    5.1E-02    2.4E-04     3.5E-02     1.1E-02   
  intakeSD      2.2E-02    7.7E-01    5.8E-03     1.0E+00     1.7E-01   
  incident            F          F          F           F           F   
  is5           0.24209    0.20829    0.21810     0.20720     0.22137   
  gim           0.00000    0.00000    0.00000     0.00000     0.00000   
  intakeDate  3/19/1978   5/6/1979   1/3/1981   11/9/1982  11/26/1983   
  intakeAmt     3.2E-02    1.9E-02    4.7E-03     2.0E-02     4.9E-03   
  intakeSD      9.6E-01    5.3E-01    1.4E-01     5.6E-01     9.4E-02   
  incident            F          F          F           F           F   
  is5           0.23315    0.18674    0.21878     0.21105     0.23536   
  gim           0.00000    0.00000    0.00000     0.00000     0.00000   
  </code></pre>
  
  <p>Now, I would like to average the intakeAmt for intakeNo1, 2, 3...; use some formula to get the intakeSD values using the values in the intakeSD rows, use some formula for incident information, etc.</p>