Extra headers and footers in CSV files

From Data-gov Wiki

Jump to: navigation, search
Infobox (Issue Report) edit with form
  • name: Extra headers and footers in CSV files

Current Issues in data.gov



Sometimes, the CSV files from a dataset have extra headers or footers. We expect a a CSV file that looks like:

 param1, param2, ...
 value, value, ...
 value, value, ...

Extra header means there is text above the line with the parameters. Footer means that there is text below the data.

The good news is that our converter can handle this, but it makes automation easier if CSV files contain only data, and extra information is put elsewhere.


  • Dataset 1489 has some HTML sitting at the bottom of a dynamically-retrieved file.
  • Extra information is at the top and bottom of the CSV file from Dataset 1567. Datasets 1568 through 1577 are also like this.
  • CSV files from Dataset 1976 have an extra header as well as a line of underscores in the row that is beneath the parameter list and above the data. It would be easier to parse if the underscores weren't there (this is true for datasets 1977 through 1983, as well).

Related Tags

Google Spreadsheet: extra header, footer (under layout) - Category:Datafile layout extra header, Category:Datafile layout footer

csv2rdf4lod solutions

Non-data lines that trail CSV rows can be skipped using URI design for RDF conversion of CSV-based data#Does data stop before the last line.3F

Facts about Extra headers and footers in CSV filesRDF feed
Dcterms:created25 June 2010  +
Dcterms:creatorSarah Magidson  +
Foaf:nameExtra headers and footers in CSV files
Related tagDatafile layout extra header  +, and Datafile layout footer  +
Skos:altLabelExtra headers and footers in CSV files  +, extra headers and footers in csv files  +, and EXTRA HEADERS AND FOOTERS IN CSV FILES  +
Personal tools
internal pages