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