I have a csv file that has several columns that I first delimit by colon (;). However, ONE column is delimited by a pipe | and I would like to delimit this column and create new columns.
Input:
Column 1 Column 2 Column 3
1 2 3|4|5
6 7 6|7|8
10 11 12|13|14
Desired Output:
Column 1 Column 2 ID Age Height
1 2 3 4 5
6 7 6 7 8
10 11 12 13 14
My code so far delimits the first time by ; and then converts to DF (which is my desired end format)
delimit = list(csv.reader(open('test.csv', 'rt'), delimiter=';'))
df = pd.DataFrame(delimit)