2021年1月16日星期六

How can I preserve the commas in the text when they're also delimiters when reading csv in pandas?

So csv file looks like this:

|  A |  B  |  C     |   ---- ----- --------    1  |  2 | Hello123,hi  

so in plain text a row is 1,2,Hello,hi

I've seen similar questions on stack overflow with no clear solutions. I cannot alter the csv file. Is there anything I can incorporate in these methods? Could I somehow split on only the first 2 commas?

df = pd.read_csv()  
df.to_sql  
https://stackoverflow.com/questions/65756189/how-can-i-preserve-the-commas-in-the-text-when-theyre-also-delimiters-when-read January 17, 2021 at 08:36AM

没有评论:

发表评论