Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Choosing between tsv and csv

Tags:

csv

tsv

I have a program that outputs a table, and I was wondering if there are any advantages/disadvantages between the csv and tsv formats.

like image 821
Purnima Avatar asked Jun 21 '12 00:06

Purnima


People also ask

What is the difference between CSV and tab delimited?

The Comma Delimited file is a file in which values are separated by commas. The . csv format can be viewed in Microsoft Excel. The Tab Delimited file is a file in which values are separated by tabs.

What is the purpose of TSV?

A tab-separated values (TSV) file is a text format whose primary function is to store data in a table structure where each record in the table is recorded as one line of the text file.

Why is CSV preferred?

CSV files can be opened by any spreadsheet program: Microsoft Excel, Open Office, Google Sheets, etc. You can open a CSV file in a simple text editor as well. It is a very widespread and popular file format for storing and reading data because it is simple and it's compatible with most platforms.


1 Answers

TSV is a very efficient for Javascript/Perl/Python to process, without losing any typing information, and also easy for humans to read.

The format has been supported in 4store since its public release, and it's reasonably widely used.

The way I look at it is: CSV is for loading into spreadsheets, TSV is for processing by bespoke software.

You can see here the technical specification of each here.

like image 92
James Avatar answered Oct 01 '22 01:10

James