This can be done simply by using python's built in CSV library. If you also care about the order of your entries, you can use an OrderedDict to maintain the original file order.
import csv f = [] f3 = file('results.csv', 'w') with open('file1.csv', 'rb') as f1, open('file2.csv', 'rb') as f2: reader1 = csv.reader(f1, delimiter=",") reader2 = csv.reader(f2, delimiter=",") for line in enumerate(reader1): f.append(line) #For the first file, add them all for line in enumerate(reader2): if not any(e[0] == line[0] for e in f): #For the second file, only add them if there is not an entry with the same name already f.append(line) for e in f: if any(e[0] == line[0]: changedindexes = i != j for ei, j in fzip(e[0], line[0]): #Line that was overwritten and changed will be printed for val in changedindexes: print (line) e[val] = e[val] + 'c' c3 = csv.writer(f3, , quoting=csv.QUOTE_ALL) for line in f: #Write the new merged files into another csv c3.writerow(line) #Then find the differences between the two orderedDicts As for bolding, there is no way to do that in CSV, as csv files contain data, not any formatting information.