title: How can I delete a row with a specific value of a column from csv ( for example delete all rows with BB or BF columns)
body: <p>How can I delete a row with a specific value of a column from csv .. I want to delete all BB and BF rows</p>
  <p><img src="https://i.stack.imgur.com/O5eLS.png" alt="1" /></p>
  <p>I tried this code but it's not working.</p>
  <p>I tried this code but it's not working.</p>
  <pre><code>import csv
  
  f = open('/content/drive/MyDrive/FemaleTrain.csv', encoding='latin-1')
  
  exclude = set(('BB', 'BF'))
  
  reader = csv.reader(f, delimiter=',')
  for row in reader:
    if any(val in exclude for val in row):
      continue
    else:
      print(row)
  </code></pre>