4 ms·
I think “most” is pulling a lot of work there. I make and process csvs a lot, and just avoid quotes when generating them. Sure technically you can do things li
by midasuni 3y ago
I think “most” is pulling a lot of work there. I make and process csvs a lot, and just avoid quotes when generating them.
Sure technically you can do things like having new lines on a line which cause all sorts of grief, but if you control the end to end workflow just avoid it.
I have a tool which monitors performance of loading various websites via various proxies at various points ok our network with pupetteer. That outputs a csv which I can then extract data from and make handy graphs to show manglement.
- meepmorp 3y agoQuotes aren't the problem, it's having an in-band separator character. Maybe you're lucky enough to only need naive splitting on commas, but lots of us need to jam in human-produced text stings where the punctuation needs to be preserved without breaking file parsing.
- benhoyt 3y ago> avoid quotes when generating them Yeah, I guess that kinda works if you're the one generating them. But you must not have too many generalised strings -- like a name field containing "Smith, John" or a book title like "The Lion, the Witch and the Wardrobe"? When I deal with CSV's those kind of things are quote common. I actually prefer TSV because you can (more easily) process them with standard AWK. What do you output for a string field with ',' in it? Just strip the commas, or replace it with something else?
- midasuni 3y agoDeal with ip addresses and numbers, maybe host names, and csvs are perfect to process