It 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).
Re:A love letter to the CSV format
by HelloNurse on Thursday March 27, 2025 @05:04AM
(#43491615)
You 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.
NOTHING is very binding about the CSV spec and that's the biggest problem with CSV.
CSV is a text file that might have commas in it
I'd definitely put that in my list of falsehoods programmers believe about CSV files.