title: Extracting data using pandas from a CSV file with a special condition
body: <p>This is example of the data I have </p>
  
  <pre><code>1, "dep, anxiety", 30 
  2, "dep"         , 40
  4, "stress"      , 30
  7, "dep, fobia"  , 20
  </code></pre>
  
  <p>I want to use pandas to filter rows having "dep" and save it in a new cvs file. output should be:</p>
  
  <pre><code>1, "dep, anxiety", 30
  7, "dep, fobia"  , 20
  2, "dep"         , 40
  </code></pre>
  
  <p>this is my code: </p>
  
  <pre><code>import pandas as pd
  patients =  pd.read_csv("patients.csv", encoding='latin-1')
  
  print(patients["dep" in patients["qual"]])
  </code></pre>
  
  <p>that has the following error </p>
  
  <pre><code>"return self._engine.get_loc(self._maybe_cast_indexer(key))"
  </code></pre>
  
  <p>And I do not know how to export the extracted data to new csv file.</p>