[Solved] How can I manipulate data using python? [closed]


while not the most elegant solution this does what you describe.

import csv
with open('test.csv', 'rb') as myFile:
    reader = csv.reader(myFile, delimiter=",", quotechar="|")
    for row in reader:
            print row[4] + ' 1:' + row[0] + ' 2:' + row[1] + ' 3:' + row[2] + ' 4:' + row[3]

OUTPUT:

a 1:43 2:674 3:345 4:547
b 1:788 2:474 3:687 4:290
c 1:44 2:567 3:1 4:89

solved How can I manipulate data using python? [closed]