title: Counting how many times a string appears in a CSV file
body: <p>I have a piece of code what is supposed to tell me how many times a word occurs in a CSV file. Note: the file is pretty large (2 years of text messages)
  This is my code:</p>
  
  <pre><code>key_word1 = 'Exmple_word1'
  key_word2 = 'Example_word2'
  counter = 0
  with open('PATH_TO_FILE.csv',encoding='UTF-8') as a:
  for line in a:
      if (key_word1 or key_word2) in line:
          counter = counter + 1
  print(counter)
  </code></pre>
  
  <p>There are two words because I did not know how to make it non-case sensitive.
  To test it I used the find function in word on the whole file (using only one of the words as I was able to do a non-case sensitive search there) and I received more than double of what my code has calculated.</p>
  
  <p>At first I did use the <code>value_counts()</code> function BUT I received different values for the same word (searching <code>Exmple_word1</code> appeared 32 and 56 times and 2 times and so on. I kind of got stuck there for a while but it got me thinking. I use two keyboards on my phone which I change regularly - could it be that the same words could actually be different and that would explain why I am getting these results?</p>
  
  <p>Also, I pretty much checked all sources regarding this matter and I found different approaches that did not actually do what I want them to do. ( the <code>value_counts()</code> method for example)</p>
  
  <p>If that is the case, how can I fix this?</p>