title: How can I use values in an old dataframe to calculate a new dataframe?
body: <p>So I have a dataframe with certain values and I want to create a new dataframe with percentage differences from the old dataframe.</p>
  <p>My existing dataframe is something like this:</p>
  <pre><code>Years          A              B          C           D          E
  2020        801.566522  769.2986786 830.8725406 830.8725406 840.7192069
  2021-2030   786.3122361 759.3832642 826.2453567 826.2453567 838.7446964
  2031-2050   787.6490105 759.1486884 827.4489946 827.4489946 839.8352851
  2041-2050   775.1016567 745.1193567 817.2389842 817.2389842 831.9880991
  </code></pre>
  <p>The new dataframe should calculate the percentage difference between the 2020 values and the values between subsequent decades, and should look something like this.</p>
  <pre><code>Years           A                 B               C                D            E
  2021-2030   -0.019030593    -0.012888901    -0.005569066    -0.005569066    -0.002348597
  2031-2050   -0.01736289     -0.013193823    -0.004120423    -0.004120423    -0.001051388
  2041-2050   -0.03301643     -0.031430344    -0.016408722    -0.016408722    -0.010385284
  </code></pre>
  <p>I can do this in excel quite easily but since I have a large number of these files, I wanted to do it in python instead. Can anyone help me out with a basic solution for this?</p>