title: How to ignore NaN values from a list?
body: <p>I have an Excel file with a column that consists of measurements, for example:</p>
  
  <p><strong>Measurements</strong></p>
  
  <p><strong>24235</strong></p>
  
  <p><strong>325434</strong></p>
  
  <p><strong>This one is empty, so it's a NaN value</strong></p>
  
  <p><strong>45345</strong></p>
  
  <p>I'm extracting that column from excel into a python list, which will result in: <em>list = ['24235', '325434', 'nan', '45435']</em>. I want to ignore NaN values to be able to calculate the total measurement. I have this to prevent taking into consideration NaN values, but it's not working:</p>
  
  <pre><code>if list[i] != 'nan' or list[i] != float('NaN'):
      counter += int(list[i])
  </code></pre>
  
  <p>It's entering the <em>if statement</em> even when it's false. How can I fix this? </p>