title: Ignoring all the non float value when convert string to float to sum them
body: <p>I'm trying to convert all string values to floating values to make an addition but, there are strings present in my csv, and it returns this error: </p>
  
  <pre><code>L.append([i, j, sum(i for i in map(float, filter(None, 
  k)) if i in {0.5, 1, 2})])
  ValueError: could not convert string to float: 'l0g0dim'
  </code></pre>
  
  <p>How can i ignore  strings with letters, comma, and other non-convertible characters and sum them with out problem ?</p>
  
  <p><strong>Sample file3.csv</strong></p>
  
  <pre><code>1754|2014-06-13 07:00:00|0|0.5|0
  1754|2014-06-13 08:00:00|0|2|0.5
  1754|2014-06-13 09:00:00|0|a0|b0|2
  1278|2014-01-26 18:00:00|light subcoatal draft ...|0|0|2|0.5
  1754|2014-06-04 19:00:00|0|leg dim|0|0
  1754|2014-06-13 10:00:00|0|(C) fins|0|0
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>    import csv
      import re
      import time
      from io import StringIO
  
  replacements = (
  ("(B)", "0"), ("(D)", "1"), ("Entrée air absente", "2"),
  
  ("+", "0.5"), ("++", "1"), ("+++", "2"),
  
  ("(S) +", "0.5"), ("(S) expi. ++", "1"), ("(S) +++", "2"),
  
  ("100", "0"), ("99", "0"), ("98", "0"), ("97", "0"), ("96", "0"),
  ("95", "0"), ("94", "1"), ("93", "1"),
  ("92", "1"), ("91", "1"), ("90", "1"), ("89", "1"),
  ("Bruits de transmission", "0"), ("Fatigué/épuisé", "0"), (" *", "0"), ("tirage sous costal", "0"), ("léger BAN", "0"),   )
  
  replvalues = dict(replacements)
  regex = "|".join(map(re.escape,                                 
  replvalues.keys()))
  repl = lambda x: replvalues.get(x.string[x.start():x.end()])
  
  with open("file3.csv", "r", encoding='utf-8') as f_in, \
      open("file4.csv", "w", encoding='utf-8') as f_out:
  
  
      for i in f_in:
          line = re.sub(regex, repl, i)
          f_out.write(line)
  
  with open("file4.csv", "r", encoding='utf-8') as f_in, \
       open("file5.csv", "w", encoding='utf-8') as f_out:
  L = []
  with f_in as fin:
      reader = csv.reader(fin, delimiter='|')
      for i, j, *k in reader:
        L.append([i, j, sum(i for i in map(float, filter(None, k)) if i in {0.5, 1, 2})])
      f_out.write(L)
  print(L)
  </code></pre>