import csv r = csv.reader(open('file.csv')) first_row = r.next() for row in r: if row[0] == first_row[0]: return True return False