Live data from Hacker News

CleverCSV: A Drop-In Replacement for Python's CSV Module

github.com

41–44 of 44 posts

Re: CleverCSV: A Drop-In Replacement for Python's CSV Module

#41
post #40

TSV --> Problem Solved! Has anyone ever stumbled upon a cell entry that needed to contain an actual tab character? No!!! The tab character's entire raison-d'etre is to separate fields, whereas the comma separates words. Technically the "C" in CSV denotes "Character" but with TSV the intent is 100% clear. The MIME type is explicit: "Note that fields that contain tabs are not allowable in this encoding." This is a vani…

What problem is solved, exactly? How do you parse the messy CSV file you've been handed, in order to convert it to TSV?

Re: CleverCSV: A Drop-In Replacement for Python's CSV Module

#42
post #41
post #40

TSV --> Problem Solved! Has anyone ever stumbled upon a cell entry that needed to contain an actual tab character? No!!! The tab character's entire raison-d'etre is to separate fields, whereas the comma separates words. Technically the "C" in CSV denotes "Character" but with TSV the intent is 100% clear. The MIME type is explicit: "Note that fields that contain tabs are not allowable in this encoding." This is a vani…

What problem is solved, exactly? How do you parse the messy CSV file you've been handed, in order to convert it to TSV?

My point is simply that TSVs are just as straightforward as CSVs but suffer none of the issues. So why are we not making TSVs to begin with?

Re: CleverCSV: A Drop-In Replacement for Python's CSV Module

#43
post #42
post #41

Earlier quoted context omitted.

What problem is solved, exactly? How do you parse the messy CSV file you've been handed, in order to convert it to TSV?

My point is simply that TSVs are just as straightforward as CSVs but suffer none of the issues. So why are we not making TSVs to begin with?

Nobody (or very few people) processing CSVs is doing it because they like them. You do it because that's how someone else created the data - someone you don't have any control over, like a government agency, financial institution, piece of obscure software, whatever.

Re: CleverCSV: A Drop-In Replacement for Python's CSV Module

#44
post #17
post #14

Earlier quoted context omitted.

Better an issue raised by a engineer then that same issue caused by an end user :shrug:

The engineer technically was an end user. It was a service that could get called as an indirect result of customer action, but without any customer supplied information passed along, which is part of the reason it didn't do any input clean-up (at least according to the post-incident report). They assumed they could trust people not to screw things up. To be fair, it had been running for a long time that way without a…

All good, I hope my comment didn't come off as snarky because I have 110% been in similar environments!
Post reply on HN