newdata = OrderedDict()
with open('test.csv', 'rb') as testr:
    testreader = csv.reader(testr)
for row in testreader:
    name = row[0] + '-' + row[1]
if name in newdata:
    newdata[name] = [max(existdata, readdata) for existdata, readdata in
        zip(newdata[name], row[2:])]
else:
    newdata[name] = row[2:]
with open('newdata.csv', 'wb') as testw:
    testwriter = csv.writer(testw)
for name, data in newdata.items():
    testwriter.writerow(name.split('-') + data)
How to get rows with the max value by using Python?