I am trying to split a specific column of csv into multiple column and then appending the split values at the end of each row.
I wanted to split second column on ',' and '.' and ';' and then append to each row respective values.
import csv
fOpen1=open('Meta_D1.txt')
reader=csv.reader(fOpen1)
mylist=[elem[1].split(',') for elem in reader]
mylist1=[]
for elem in mylist:
mylist1.append(elem)
#writing to a csv file
with open('out1.csv', 'wb') as fp:
myf = csv.writer(fp, delimiter=',')
myf.writerows(mylist1)
Can someone guide me further?