4 ms·
This addresses part of the problem. Don't forget the character encoding, null encodings, separator, quote and escape chars,... No doubt, you can use csv in a w
by riedel 5y ago
This addresses part of the problem. Don't forget the character encoding, null encodings, separator, quote and escape chars,...
No doubt, you can use csv in a well defined way if there is agreement and specs. The problem is there simply isn't any defacto standard and it won't be able to establish one in this domain...
Btw. : The python intake package allows you to specify metadata.
- mamcx 5y agoBut is like with json: We are not debating about that details because is a bit more well defined. For a improved CSV, that minutae must be defined from the start, but also must take in account how is CSV used, and keep it spirit. P.D: A example on something like this is https://commonmark.org https://commonmark.org, that codify the rules for markdown in a better defined speck.
- munk-a 5y agoNull encoding is entirely uncovered by the CSV format - if you want to communicate nulls you need to have an internal convention - some sort of reserved string. Quoting characters are pretty commonly agreed to be " (aka ") and escape characters are technically unnecessary. Deciding to support \\ and \n is a pretty nice thing to do since some producers and parsers will erroneously choke on mid-string newlines but the only character that actually needs to be escaped (the double quote) can just be doubled up as per RFC4180[1]. The indecision on escaping means that the literal character sequence "\n" is very hard to represent in CSV consistently this is an unfortunate malus of C programmers getting all up in the standard. RFC4180 is an after-the-fact RFC to try and codify common practices in the industry so some tools may refuse to conform to it - but it's really clearly written and like... super short. If you've never read it just go ahead and do so since it lays things out with exceeding care. 1. https://datatracker.ietf.org/doc/html/rfc4180#section-2 https://datatracker.ietf.org/doc/html/rfc4180#section-2
- deleted 5y ago[deleted]
- alecst 5y agoI work with CSVs often and we usually just use blanks like item1,item2,,item4,,,item7 to represent nulls. What do you think the pitfalls are here? (Sincere question, wondering how we can improve.)