3 ms·
> CSV is lists of lists of fixed length. I'd definitely put that in my list of falsehoods programmers believe about CSV files.
by meepmorp 2y ago
> CSV is lists of lists of fixed length.
I'd definitely put that in my list of falsehoods programmers believe about CSV files.
- timacles 2y agoCSV is a text file that might have commas in it
- deleted 2y ago[deleted]
- hajile 2y agoIt seems to be indicated by RCF-4180 which says > This header will contain names corresponding to the fields in the file and should contain the same number of fields as the records in the rest of the file But of course, CSV is the wild west and there's no guarantee that any two encoders will do the same thing (sometimes, there's not even a guarantee that the same encoder will do the same thing with two different inputs). [0] https://www.ietf.org/rfc/rfc4180.txt https://www.ietf.org/rfc/rfc4180.txt
- HelloNurse 2y agoYou should know that "should" isn't very binding. Headers should have as many rows as possible that contain data items for their column and data items in a row should have a header for the respective columns, but real CSV files should be assumed to have incomplete or variable length lines.
- hajile 2y agoNOTHING is very binding about the CSV spec and that's the biggest problem with CSV.
- miningape 2y agoyeah if I had a cookie for every time I've had to deal with this I'd have maybe 10 cookies - it's not a lot but it's more than it should be.