Michael Lipkin
1 min readMay 8, 2021

--

Never ever use csv.

If you need a plain text format use tsv

(tab separated values)

It is not unusual for a text field to contain a comma. Then the string needs to be within quotes, but what if the data field also has quotes? etc etc.

Tabs very rarely occur within data fields.

Hence if you need to use a crude script (e.g. sed, bash, awk, perl) to perform some manipulation on the data it will be simple.

There is another reason.

In a multi user environment there may be someone lurking with Excel, and the default installation of Excel assigns .csv to open in Excel.

So this user can double click on your csv file and corrupt it using Excel!

(some text turned to dates etc etc - see the great gene name disaster)

Fortunately tsv forces them to go through the import wizard and then if they corrupt the data they have done it consciously!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response