I have a csv file with a list like this:
12, 1233, 234
12, 1233, 989
12, 9898, 213
14, 1233, 987
14, 1233, 876
I want to make an array for the rows which are similar. for example in the above example, i want make an array of which is like this: 12, 1233 [234, 989] since the values in their first two rows are same
import csv with open('check.csv', 'r') as csvfile:
reader = csv.reader(csvfile, delimiter=',') for row in reader:
print(re.search( #uniqueSet = list(set(x))