How to split every column by ":", using pandas
,0,1,2,3,4
0,MMSI : 222111345,Country : Singa,Ship name : xxxVessel,Call sign : abcd,IMO number : 12345
1,MMSI : 222111345,Country : Singa,Ship name : xxxVessel,Call sign : abcd,IMO number : 12345
2,MMSI : 222111345,Country : Singa,Ship name : xxxVessel,Call sign : abcd,IMO number : 12345
3,MMSI : 222111345,Country : Singa,Ship name : xxxVessel,Call sign : abcd,IMO number : 12345
I tryed
df3 = df3[df3.columns[0]].str.split(":",expand=True) but doesn´t work
df = pd.read_csv("test_data1", header=None, sep=":")while you reading the file itself?