title: Sum all values in CSV
body: <p>I have a CSV file with <code>0</code>s and <code>1</code>s and need to determine the sum total of the entire file. The file looks like this when opened in ExCel:</p>
  
  <pre><code>0 1 1 1 0 0 0 1 0 1
  1 0 1 0 0 1 1 0 0 0
  0 0 1 0 0 0 0 1 0 1
  0 1 1 1 1 1 1 0 1 1
  0 0 1 0 1 0 1 1 0 1
  0 0 0 0 0 0 0 0 1 0
  0 0 1 0 0 1 1 0 1 1
  0 0 1 1 0 0 1 1 0 1
  1 0 1 0 1 0 1 1 1 0
  0 1 0 0 1 0 0 0 1 1
  </code></pre>
  
  <p>Using this script I can sum the values of each row and they print out in a single column:</p>
  
  <pre><code>import csv 
  
  import numpy as np
  
  path = r'E:\myPy\one_zero.csv' 
  
  infile = open(path, 'r')
  
  with infile as file_in: 
      fin = csv.reader(file_in, delimiter = ',') 
      for line in fin: 
          print line.count('1')
  </code></pre>
  
  <p>I need to be able to sum up the resulting column, but my experience with this is mild. Looking for suggestions. Thanks.</p>