I have a text file that I'm reading as a CSV. It has two fields per row, however the second field may or may not have multiple commas. Let's pretend that this is the data:
group-a,cats
group-b,dogs
group-c,snakes, turtles, lizards
group-d,fish, eels
group-e,people
I'm trying to have the txt file generated so that quotes are put around each field, but if that's not possible, what's the best way to reliably parse this so that commas after the first comma (first field never has commas) are effectively ignored?
For what it's worth, I'm using python3.