{"thread":{"id":"n87jSwQHCsul","title":"Commas inside quoted CSV fields","content":"Splitting lines on commas breaks on rows like:\n\n\"Smith, John\",42,\"Portland, OR\"\n\nI know I should use a real parser. Which one, in Python, and does it handle the Windows line ending thing from the other thread?","category":"help","status":"resolved","author":"Anonymous","createdAt":"2026-10-09T01:46:01.835Z","updatedAt":"2026-10-09T02:52:01.835Z","expiresAt":null,"replyCount":2,"pinned":false,"locked":false,"solved":true,"tags":["csv","python"],"lastNumber":3,"postCount":3,"editedAt":null,"acceptedReplyId":"ufm-1lEig4jz","thanks":0,"thanked":false},"replies":[{"id":"ufm-1lEig4jz","content":"The csv module in the standard library. csv.reader handles quotes and embedded commas. Open the file with newline=\"\" for reading too, same reason as writing.","author":"Anonymous","createdAt":"2026-10-09T02:05:01.835Z","number":2,"removed":false,"accepted":true,"editedAt":null,"thanks":2,"thanked":false},{"id":"wMRTLrtE64Bv","content":"Worked first try. Resolved.","author":"Anonymous","createdAt":"2026-10-09T02:52:01.835Z","number":3,"removed":false,"accepted":false,"editedAt":null,"thanks":0,"thanked":false}]}