skip an error row in a for loop
<p>I am iterating through each row in a csv file and choose/calculate only rows that meet the condition. However, when there is an error in a row, it stops the loop. is there a way to tell python to skip the error and move to the next row? I use the <code>try</code> function but did not work. my code is</p>

<pre><code>try(row['BAS'] = float(row['Close Ask']) - float(row['Close Bid']))
</code></pre>

<p>the error is one of the cell is a string and cannot be converted into a float</p>