Skip to content
Different Delimiters
step 1/5

Reading — step 1 of 5

Read

~1 min readThe Basics

Different Delimiters

CSV is really "(D)SV" — delimiter-separated values. Common delimiters:

  • , (comma) — classic
  • ; (semicolon) — Excel in European locales
  • \t (tab) — TSV
  • | (pipe) — sometimes for piped data
  • (space) — uncommon, ambiguous

Most parsers auto-detect or take a delimiter= parameter.

Python's csv module:

python

Detection heuristic: try a few delimiters; pick the one that produces consistent column counts across rows.

For interop, ALWAYS specify the delimiter explicitly. Never guess.

When generating CSV: always quote fields containing delimiter chars to keep parsers happy.

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…