title: calculating sum of csv file in Python 3.6.2
body: <p>I am using Python 3.6.2 and have a csv file that looks like this:</p>
  
  <pre><code>STATE,RATE,DEATHS
  IA,4.2,166
  NH,4.2,52
  MA,4.3,309
  CA,4.4,"2,169"
  CO,4.6,309
  ID,4.6,106
  NY,4.6,"1,087"
  VT,4.6,27
  NJ,4.7,487
  WA,4.9,432
  </code></pre>
  
  <p>I am trying to calculate the sum of the "RATE" column. However, with my current code below I keep getting the error: "TypeError: 'float' object is not iterable". I am fairly new to Python and am not sure what I'm doing wrong. </p>
  
  <pre><code>import csv
  with open('infant_mortality.csv', 'r') as f:
    next(f) #skips the first row
    for row in csv.reader(f):
      total = sum(float(row[1]))
    print('The total is {}'.format(total))
  </code></pre>
  
  <p>Thanks for the help! </p>