title: Pandas - Rebasing values based on a specific column
body: <p>I have the following dataframe:</p>
  
  <pre><code>     Name    2018-02-28    2018-01-31    2018-12-31    2017-11-30    2017-10-31    2017-09-30
  ID
  11   ABC      110           109           108             100            95                90
  22   DEF      120           119           118             100            85                80
  33   GHI      130           129           128             100            75                70
  </code></pre>
  
  <p>I would like to obtain the below table where the resulting data reflects the % chg of the row's values relative to a particular row, in this case 2017-11-30's values. </p>
  
  <p>Then, create a row at the bottom of the dataframe that provides the average. </p>
  
  <pre><code>     Name    2018-02-28    2018-01-31    2018-12-31    2017-11-30    2017-10-31    2017-09-30
  ID
  11   ABC      10.0%         9.0%         8.0%             0.0%         -5.0%           -10.0%
  22   DEF      20.0%         19.0%        18.0%            0.0%         -15.0%          -20.0%
  33   GHI      30.0%         29.0%        28.0%            0.0%         -25.0%          -30.0%
      Average   20.0%         19.0%        18.0%            0.0%         -15.0%          -20.0%
  </code></pre>
  
  <p>My actual dataframe has about 50 columns and 50 rows, and the actual column as the "base" value when we calculate the % chg is 1 year ago (ie column 14). A solution as generic as possible would be really appreciated!</p>