title: Parse data frame by rows
body: <p>I have a data frame that has 5 columns named as '0','1','2','3','4'</p>
  
  <pre><code>small_pd
  Out[53]: 
            0     1     2     3     4 
  0      93.0  94.0  93.0  33.0   0.0  
  1      92.0  94.0  92.0  33.0   0.0 
  2      92.0  93.0  92.0  33.0   0.0  
  3      92.0  94.0  20.0  33.0  76.0 
  </code></pre>
  
  <p>I want to use row-wise the input above to feed a function that does the following. I give as example for the first and second row</p>
  
  <p>firstrow:</p>
  
  <pre><code>takeValue[0,0]-takeValue[0,1]+takeValue[0,2]-takeValue[0,3]+takeValue[0,4]
  </code></pre>
  
  <p>secondrow:</p>
  
  <pre><code>   takeValue[1,0]-takeValue[1,1]+takeValue[1,2]-takeValue[1,3]+takeValue[1,4]
  </code></pre>
  
  <p>for the third row onwards and then assign all those results as an extra column.</p>
  
  <pre><code>small_pd['extracolumn']
  </code></pre>
  
  <p>Is there a way to avoid a typical for loop in python and do it in a much better way?</p>
  
  <p>Can you please advice me?
  Thanks a lot
  Alex</p>