How to upload a .txt file in python dataframe
try using engine='python' and error_bad_lines=False in your pd.read_csv()
I am trying to upload a txt file which contains data as below . I have around 1M records in the file .
Data consist of different fields (which is to be columns ) in which I have manually added a comma as a delimiter.
The challenge is all the records does not have the same set of fields.
The columns should be "Time" , "ENTER" , "TRANSID" , "SUPERCODE" ,"ID", "MRP","VOLUME","VALUE","PRODUCTtype","BUILDING","TAXNUM", "TAGFIELDS"

00:00:00.000:, ENTER, transId=1, Supercode=BD3G, id=1, MRP=0.12s9,
volume=110333, value=20942463.27, productype=se IA CF, building=11430,
taxnumber=110F1, tagFields={B=C C=NZd3/1 D="20170514 07:41:53.616"
F=:00000017PouM H=LMT O=6521B841:00023662-A-15.1sd01.200.0.50dsd03.0.0
R="Order not Added" a=A c=FIRST3eNZA j=N}
00:00:00.000:, ENTER,transId=2,Supercode=BYG, id=2, MRP=0.195,
volume=223000, value=43485,> productype=se IA CF, building=110,
taxnumber=110I1, tagFields={B=C> C=NZ3 D="20170514 07:41:25.161"
F=:00000017PouK H=LMT> O=6521B841:00023625-A-15.101.200.0.5003.0.0
R="Ordernot Added" a=A> c=FIRSTNZA j=N}


#For this record, there is no taxnumber , so the TAXnumber column field should be blank/Nan for this record
00:00:00.000:, ENTER,  transId=3, Supercode=TBC, id=3,MRP=2.71,
volume=3750, value=10162.5, productype=It CF UeCP,> building=110,
tagFields={B=C C=4331K D="20170514 > 13:59:51.288"
H=LMT K=12345O=6521B841:0027d59B6-B-15.101.200.0.5009.0.0 R="Order
notAdded" a=P c=4sd33E> j=N}

#For this record, there is no building number , so the building number column field should be blank/Nan for this record

00:00:00.000:, ENTER, transId=4, Supercode=ABT, id=4, MRP=2.73,>
volume=357, value=974.61, productype=se IrA CtF,
taxnumber=110B1, tagFields={B=C C=ZBJF D="20170929 16:10:01.321" H=LT
O=6521B5841:003A98565-A-15.101.2050.0.5009.0.0 R="Order not  Added" a=A
c=BNPLLCOLO j=Y}

I have tried the below steps:

data = pd.read_csv("path.txt",delimiter=",",header=None)

I have got the output

ParserError: Error tokenizing data. C error: Expected 10 fields in
line 66017, saw 11