title: Using numpy present value function
body: <p>I am trying to compute the present value using numpy's pv function in pandas dataframe.
  I also have 2 lists, one includes period [6,18,24] and other one includes pmt 
  values [100,200,300].
  Present value should be computed for each value in pmt list to each value in period list.</p>
  
  <p>lets say in below table column values represents period and row represents pmt</p>
  
  <p><img src="https://i.stack.imgur.com/CFNf2.png" alt="Click to see the image">  </p>
  
  <p>I am trying to compute the data values using a single line of code without writing multiple lines How can I do that? </p>
  
  <p>Currently I hard coded the period as follows.</p>
  
  <pre><code>PRESENT_VALUE6 = np.pv(pmt=-PMT_REMAINING_PERIOD,rate=(INTEREST_RATE/12),nper=6,fv=0,when=0)
  PRESENT_VALUE18 = np.pv(pmt=-PMT_REMAINING_PERIOD,rate=(INTEREST_RATE/12),nper=18,fv=0,when=0)
  PRESENT_VALUE30 = np.pv(pmt=-PMT_REMAINING_PERIOD,rate=(INTEREST_RATE/12),nper=30,fv=0,when=0)
  </code></pre>
  
  <p>I want the python to iterate the nper from the list, currently when I do that it produces the following not the expected result  </p>
  
  <p><img src="https://i.stack.imgur.com/GW60C.png" alt="Click to see the image"></p>
  
  <p>Expected result is </p>
  
  <p><img src="https://i.stack.imgur.com/oYoZl.png" alt="Click to see the image"></p>