I have a csv file with thousands of lines. I would like to retrieve only the lines with some similarity regarding a specific word. In this case I am expecting to catch the line 1, 2 and 4.
Any idea how to achieve that?
import csv
a='Microsoft'
f = open("testing.csv")
reader = csv.reader(f, delimiter='\n')
for row in reader:
if a in row[0]:
print row[0]
testing.csv
I like very much the Microsoft products
Me too, I like Micrsoft
I prefer Apple products
microfte here