My CSV data looks like this:
ID;name;info
1;ABC;text1
2;DEF;text2;text3
3;GHI;text4;
4;JKL;text5;text6;text7
There are 3 named columns. The additional unnamed columns all relate to the last one (info), and the amount of those additional columns is not known.
Using df=pd.read_csv(filename, delimiter=";", dtype=object) returns a "Error tokenizing data. C error..." due to irregular shape.
Is it possible to merge the last columns into one column containing a list, to achieve the result below?
ID;name;info
1;ABC;[text1]
2;DEF;[text2, text3]
3;GHI;[text4]
4;JKL;[text5, text6, text7]