title: Getting percentage change from first element to last element
body: <p>I have this dataset, and I'm trying to find the percentage change from the element each row respective to the element at &quot;9&quot; column.</p>
  <p>Functionally, what I am trying to do is graph the percentage change throughout the day of a stock price so I can overlay the average percent change for that specific day.</p>
  <p>I have tried to tweak around with panda's <code>pct_change()</code> function but that's only taking the percentage change from each element to the next, which is counter productive.</p>
  <p>Here is an example of the dataframe.</p>
  <p>Any help or insight would be greatly appreciated.</p>
  <pre><code>Hour        9       10      11      12      13      14      15      16
  Date                                
  2016-01-05  20.6475 20.5900 20.4225 20.6275 20.1600 19.6500 19.6250 19.4100
  2016-01-06  21.3550 20.8675 20.6100 20.6525 20.8900 21.0125 21.0600 20.5125
  2016-01-07  23.0075 22.7975 23.0050 23.5975 24.4675 25.2450 25.1600 24.9575
  2016-01-08  22.9125 23.2400 23.8575 23.9475 24.0425 24.4000 25.7950 26.7625
  2016-01-11  25.7500 25.9100 25.8800 25.9325 26.7650 26.4025 24.9425 24.2725
  </code></pre>