title: Calculate mean val from column excluding 'None' values
body: <p>I have a large array of tab delimited data. I'd like to calculate the mean values for each column. The problem is some values are 'None' and I'd like to perform the calculation and exclude these data points.</p>
  
  <p>The data structure looks like this:</p>
  
  <pre><code>0.0     0.5     0.0     0.142857142857  0.0     0.0
  0.0     0.0     0.0     0.0             0.0     0.0
  0.0     0.8     0.0     None            0.0     0.0
  </code></pre>
  
  <p>I'm using this code. Not sure how to add the condition into this:</p>
  
  <pre><code>data = [float(l.split('\t')[target_column_val]) \
             for l in open(target_file, 'r').readlines()]
  mean = sum(data) / len(data)
  </code></pre>