{
  "slug": "csv",
  "term": "Comma-separated values (CSV)",
  "aliases": [
    "CSV",
    "Comma-separated values",
    "Comma separated values"
  ],
  "definition": "CSV is a text format for tabular records whose fields are separated by commas and can be quoted to contain delimiters or line breaks.",
  "note": "Syntax: RFC 4180 describes a common CSV format and registers text/csv; it is Informational, not an Internet Standard. Quoted fields can contain commas and line breaks, and embedded double quotes are doubled. A physical line is therefore not necessarily a complete record. [csv-rfc]\n\nInterpretation: Agree on character encoding, delimiter, quoting, header presence and column meanings. CSV field syntax alone does not define application data types or a universal NULL representation. A valid parse does not establish a valid database import; strict parser mode does not enforce column count. [csv-rfc] [csv-python]\n\nConversion: The default Python CSV reader returns strings; QUOTE_NONNUMERIC converts unquoted fields to floating-point values. Preserve identifiers as text before applying explicit validation. The default writer maps None to an empty string, losing the distinction from empty text. [csv-python]\n\nRecovery: Preserve both original bytes and the interpretation contract. The existing CSV restore experiment separates null-aware input from a rewrite that already discarded missingness; a later reader cannot infer the lost distinction from those bytes alone. [csv-recovery]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    "Quoting protects field boundaries, not numeric precision, schema conformance or recovery of values discarded by an earlier conversion."
  ],
  "related": [
    "data-serialization",
    "character-encoding",
    "sqlite-type-affinity"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-22",
  "citations": [
    {
      "id": "csv-rfc",
      "title": "RFC 4180: common CSV format and text/csv registration, sections 2 and 3",
      "url": "https://www.rfc-editor.org/rfc/rfc4180.html",
      "accessed": "2026-11-21"
    },
    {
      "id": "csv-python",
      "title": "Python 3.12: CSV reader, writer and dialect contracts",
      "url": "https://docs.python.org/3.12/library/csv.html",
      "accessed": "2026-11-21"
    },
    {
      "id": "csv-recovery",
      "title": "Hesela: CSV restoration and NULL fidelity across reader and rewrite boundaries",
      "url": "https://hesela.com/analyses/backup-verification-is-not-a-restore-test/#csv-null-fidelity",
      "accessed": "2026-11-21"
    }
  ],
  "provenance": [
    "Source synthesis linked to the existing CSV recovery experiment; no new dataset, format-wide benchmark or claim that all CSV dialects follow RFC 4180."
  ]
}
