title: Calculate Daily Returns with Pandas DataFrame
body: <p>Here is my Pandas data frame:</p>
  
  <pre><code>prices = pandas.DataFrame([1035.23, 1032.47, 1011.78, 1010.59, 1016.03, 1007.95, 
                1022.75, 1021.52, 1026.11, 1027.04, 1030.58, 1030.42,
                1036.24, 1015.00, 1015.20])
  </code></pre>
  
  <p>Here is my <code>daily_return</code> function:</p>
  
  <pre><code>def daily_return(prices):
      return prices[:-1] / prices[1:] - 1
  </code></pre>
  
  <p>Here is output that comes from this function:</p>
  
  <pre><code>0    NaN
  1      0
  2      0
  3      0
  4      0
  5      0
  6      0
  7      0
  8      0
  9      0
  10     0
  11     0
  12     0
  13     0
  14   NaN
  </code></pre>
  
  <p>Why am I having this output?</p>