title: How to Perform Mathematical Operation on One Value of a CSV file?
body: <p>I am dealing with a csv file that contains three columns and three rows containing numeric data.  The csv data file simply looks like the following:</p>
  
  <pre><code> Colum1,Colum2,Colum3
   1,2,3
   1,2,3
   1,2,3  
  </code></pre>
  
  <p>My question is how to write a python code that take a single value of one of the column and perform a specific operation.  For example, let say I want to take the first value in 'Colum1' and subtract it from the sum of all the values in the column. </p>
  
  <p>Here is my attempt:</p>
  
  <pre><code>import csv
  f = open('columns.csv')
  rows = csv.DictReader(f)
  
  value_of_single_row = 0.0
  for i in rows:
      value_of_single_Row += float(i) # trying to isolate a single value here!
  print value_of_single_row - sum(float(r['Colum1']) for r in rows) 
  f.close()
  </code></pre>