Tab-separated values

Tab-separated values
Filename extension.tsv, .tab[1]
Internet media type
text/tab-separated-values
Uniform Type Identifier (UTI)public.tab-separated-values-text[2]
UTI conformationpublic.delimited-values-text[2]
Developed byUniversity of Minnesota Internet Gopher Team

Internet Assigned Numbers Authority
Initial releasec. June 1993; 31 years ago (1993-06)
Type of formatDelimiter-separated values format
Container fordatabase information organized as field separated lists
StandardIANA MIME type

Tab-separated values (TSV) is a simple, text-based file format for storing tabular data.[3] Records are separated by newlines, and values within a record are separated by tab characters. The TSV format is thus a delimiter-separated values format, similar to comma-separated values.

TSV is a simple file format that is widely supported, so it is often used in data exchange to move tabular data between different computer programs that support the format. For example, a TSV file might be used to transfer information from a database to a spreadsheet.

Example

The head of the Iris flower data set can be stored as a TSV using the following plain text (note that the HTML rendering may convert tabs to spaces):

Sepal length	Sepal width	Petal length	Petal width	Species
5.1	3.5	1.4	0.2	I. setosa
4.9	3.0	1.4	0.2	I. setosa
4.7	3.2	1.3	0.2	I. setosa
4.6	3.1	1.5	0.2	I. setosa
5.0	3.6	1.4	0.2	I. setosa

The TSV plain text above corresponds to the following tabular data:

Sepal length Sepal width Petal length Petal width Species
5.1 3.5 1.4 0.2 I. setosa
4.9 3.0 1.4 0.2 I. setosa
4.7 3.2 1.3 0.2 I. setosa
4.6 3.1 1.5 0.2 I. setosa
5.0 3.6 1.4 0.2 I. setosa

Character escaping

The IANA media type standard for TSV achieves simplicity by simply disallowing tabs within fields.[4]

Since the values in the TSV format cannot contain literal tabs or newline characters, a convention is necessary for lossless conversion of text values with these characters. A common convention is to perform the following escapes:[5][6]

escape sequence meaning
\n line feed
\t tab
\r carriage return
\\ backslash

Another common convention is to use the CSV convention from RFC 4180 and enclose values containing tabs or newlines in double quotes. This can lead to ambiguities.[7][8]

Line endings

Records are typically separated by a line feed, as is typical for Unix platforms, or a carriage return and line feed, as is typical for Microsoft platforms. Some programs may expect the latter. The de-facto specification[9] specifies that records are separated by an EOL, but does not specify any specific newline.

See also

References

  1. ^ U of Edin. Research Data Support Team. "Choose the best file formats". University of Edinburgh. § Formats we recommend. Retrieved 23 May 2023.
  2. ^ a b "tabSeparatedText". Apple Developer Documentation: Uniform Type Identifiers. Apple Inc. Retrieved 23 May 2023.
  3. ^ "How To Use Tab Separated Value (TSV) files". International Monetary Fund. Retrieved 1 February 2023.
  4. ^ Lindner 1993.
  5. ^ Dusek, Jason (6 May 2014). "Linear TSV: simple, line-oriented, tabular data". Data Protocols - Open Knowledge Foundation (v1.0β ed.).
  6. ^ Dolan, Stephen (1 November 2018). "jq Manual". jq. Retrieved 23 May 2023.
  7. ^ Miller, Rob (22 September 2015). Text Processing with Ruby: Extract Value from the Data That Surrounds You. Pragmatic Bookshelf. p. 94. ISBN 978-1-68050-492-7.
  8. ^ Giuseppini, Gabriele; Burnett, Mark (10 February 2005). Microsoft Log Parser Toolkit: A Complete Toolkit for Microsoft's Undocumented Log Analysis Tool. Elsevier. p. 311. ISBN 978-0-08-048939-1.
  9. ^ "IANA: text/tab-separated-values".

Sources

Further reading

Read other articles:

Early-to-mid-1980s music cultural movement This article is about the Second British Invasion. For the 1960s British music movement, see British Invasion. Second British InvasionPart of the 1980s in the United States and United KingdomDuration1982–mid-1980sLocationUnited States, United KingdomCauseRise of British synth-pop and new wave artists in U.S. pop music charts The Second British Invasion was a sharp increase in the popularity of British synth-pop and new wave artists in the United State…

Napoli Mergellinastazione ferroviariagià Chiaia LocalizzazioneStato Italia LocalitàNapoli Coordinate40°49′53″N 14°13′09″E / 40.831389°N 14.219167°E40.831389; 14.219167Coordinate: 40°49′53″N 14°13′09″E / 40.831389°N 14.219167°E40.831389; 14.219167 Linee StoriaStato attualein uso Attivazione1925 CaratteristicheTipofermata in superficie, passante Binari2 OperatoriTrenitalia Interscambiautobus urbaniMergellinaPorto  Napoli Mergellin…

Public school in Phnom Penh, Cambodia This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Lycée Sisowath – news · newspapers · books · scholar · JSTOR (May 2008) (Learn how and when to remove this message)Please add Khmer script to this article, where needed. Lycée Sisowathវិទ្យាល័យព្រះ…

Simpangan Kereta Wuhan (Hanzi: 武汉铁路枢纽) adalah salah satu dari empat simpangan kereta terpenting di Republik Rakyat Tiongkok.[1] Simpangan Kereta Wuhan, mulai dari Stasiun Kereta Utara Wuhan di utara hingga Stasiun Kereta Wulongquan di selatan. Kereta Api Beijing-Guangzhou, Kereta kecepatan tinggi Beijing-Guangzhou-Shenzhen-Hong Kong dan Kereta Jingjiu melintasi Wilayah Metropolitan Wuhan arah utara-selatan, sedangkan Kereta Wuhan-Jiujiang, Kereta Hankou-Danjiangkou dan Ke…

Bay in northern Province of Papua and West Papua, New Guinea, Indonesia Cenderawasih BayTeluk Cenderawasih (Indonesian)Location of Cenderawasih BayCenderawasih BayLocationWestern New GuineaCoordinates2°30′00″S 135°20′00″E / 2.50000°S 135.33333°E / -2.50000; 135.33333TypeBayBasin countries IndonesiaMax. width450 kilometres (280 mi)Max. depth1,627 metres (5,338 ft) Cenderawasih Bay (Indonesian: Teluk Cenderawasih, Bird of Paradise Bay), …

Russian freestyle wrestler In this name that follows Eastern Slavic naming customs, the patronymic is Mamatkhanovich and the family name is Gadisov. Abdusalam Gadisovgold medal to the freestyle wrestler Khetag Gazyumov, Wrestling at the 2015 European GamesPersonal informationBirth nameAbdusalam Mamatkhanovich GadisovNicknameMr OlympiaBorn (1989-03-26) 26 March 1989 (age 35)Makhachkala, Dagestan ASSR, Russian SFSR, Soviet UnionHeight1.81 m (5 ft 11 in)WeightLight Heav…

Ця стаття потребує додаткових посилань на джерела для поліпшення її перевірності. Будь ласка, допоможіть удосконалити цю статтю, додавши посилання на надійні (авторитетні) джерела. Зверніться на сторінку обговорення за поясненнями та допоможіть виправити недоліки. Матер…

Pour les articles homonymes, voir Bombon (homonymie). Bombon Le château construit dans un style typiquement français du XVIIe siècle, marqué par des proportions architecturales symétriques et des hautes toitures d'ardoise. Blason Administration Pays France Région Île-de-France Département Seine-et-Marne Arrondissement Melun Intercommunalité Communauté de communes Brie des Rivières et Châteaux Maire Mandat Joëlle Salazar 2020-2026 Code postal 77720 Code commune 77044 Démographi…

2020年夏季奥林匹克运动会马来西亚代表團马来西亚国旗IOC編碼MASNOC马来西亚奥林匹克理事会網站olympic.org.my(英文)2020年夏季奥林匹克运动会(東京)2021年7月23日至8月8日(受2019冠状病毒病疫情影响推迟,但仍保留原定名称)運動員30參賽項目10个大项旗手开幕式:李梓嘉和吳柳螢(羽毛球)[1][2]閉幕式:潘德莉拉(跳水)[3]獎牌榜排名第74 金牌 銀牌 銅牌 …

Raja-udang Biru Alcedo coerulescensdari Muara Cikeas, Babelan, Bekasi Status konservasi Risiko Rendah  (IUCN 3.1)[1] Klasifikasi ilmiah Kerajaan: Animalia Filum: Chordata Kelas: Aves Ordo: Coraciiformes Famili: Alcedinidae Genus: Alcedo Spesies: A. coerulescens Nama binomial Alcedo coerulescensVieillot, 1818[2] Raja-udang biru[3] atau burung udang biru[4] (Alcedo coerulescens) adalah spesies burung dari keluarga Alcedinidae, dari genus Alcedo. Burung ini…

Former German charter airline Bavaria Germanair IATA ICAO Callsign BV - Bavaria Commenced operationsJanuary 1977Ceased operationsJanuary 1979HeadquartersBavaria, Germany Bavaria Germanair Airbus A300B4 at Frankfurt Airport in June 1977 Bavaria Germanair was an airline that came into being following the merger of Bavaria Fluggesellschaft and Germanair on 1 January 1977. The airline's main area of activity was operating charter flights from German airports to European holiday destinations. The air…

Эта статья — о современной технологии печатания крупных тиражей. Об истории см. Книгопечатание; о печати мелкими тиражами см. Принтер, Копировальный аппарат, Ризограф (оперативная полиграфия). Не следует путать с полиграфией — исследованием с примен…

Toyotacittà豊田市Toyota-shi Toyota – Veduta LocalizzazioneStato Giappone RegioneChūbu Prefettura Aichi SottoprefetturaNon presente DistrettoNon presente TerritorioCoordinate35°05′N 137°09′E35°05′N, 137°09′E (Toyota) Superficie918,47 km² Abitanti423 343 (1-7-2011) Densità460,92 ab./km² Altre informazioniCod. postale471-8501 (municipio) Prefisso0565 Fuso orarioUTC+9 CartografiaToyota Toyota – Mappa Sito istituzionaleModifica dati su Wikidata · Man…

Mountain ridge in Pennsylvania, United States For the mountain in North Carolina formerly called Negro Mountain, see Mount Jefferson (North Carolina). For the country in the Balkans, see Montenegro. Negro MountainNegro Mountain and Deer Valley LakeHighest pointElevation3,213 ft (979 m)Coordinates39°47′10″N 79°10′30″W / 39.78611°N 79.17500°W / 39.78611; -79.17500GeographyNegro MountainLocation of Negro Mountain in Pennsylvania LocationSomers…

Albrecht IIMarkgraf MeißenLandgraf ThüringenComte Palatinus SachsenMarkgraf MeißenBerkuasa1288–1292PendahuluHeinrich IIIPenerusFriedrich TutaLandgraf ThüringenBerkuasa1265–1294PendahuluHeinrich IIIPenerusAdolfReichsvikarBerkuasa1265–1292PendahuluHeinrich IIIPenerusFriedrich IInformasi pribadiKelahiran1240Meißen, Kadipaten Sachsen, Kekaisaran Romawi SuciKematian20 November 1314Erfurt, Kadipaten Sachsen-Wittenberg, Kekaisaran Romawi SuciWangsaWangsa WettinNama lengkapAlbrecht yang Meros…

American politician Reginaldo Francisco del ValleReginaldo Francisco del Valle, c. 1878-8024th President pro tempore of the California SenateIn office1882–1883Member of the California SenateIn office1882–1885Member of the California AssemblyIn office1880–1881 Personal detailsBorn(1854-12-15)December 15, 1854Los Angeles, California, U.S.DiedSeptember 20, 1938(1938-09-20) (aged 83)Los Angeles, California, U.S.Alma materSanta Clara UniversityProfessionLawyer Reginaldo Francisco del Valle…

2.71828..., base of natural logarithms For other uses of e, see e (disambiguation). Euler's number redirects here. For other Euler's numbers, see List of things named after Leonhard Euler § Numbers. Constant value used in mathematics Euler's numbere2.71828...[1]General informationTypeTranscendentalHistoryDiscovered1685ByJacob BernoulliFirst mentionQuæstiones nonnullæ de usuris, cum solutione problematis de sorte alearum, propositi in Ephem. Gall. A. 1685Named after Leonhard Euler…

В Википедии есть статьи о других людях с такой фамилией, см. Дорошенко. Дорошенко Галина Степановна Депутат Государственной Думы Федерального Собрания Российской Федерации IV созыва 29 декабря 2003 года — 24 декабря 2007 года Рождение 15 сентября 1947(1947-09-15)Новотитаровская Смер…

Constellation in the northern celestial hemisphere Canes VenaticiConstellationList of stars in Canes VenaticiAbbreviationCVnGenitiveCanum VenaticorumPronunciation/ˈkeɪniːz vɪˈnætɪsaɪ/ KAY-neez vih-NAT-ih-seye,[1] genitive /ˈkeɪnəm vɪnætɪˈkɒrəm/Symbolismthe Hunting DogsRight ascension12h 06.2m to 14h 07.3m Declination+27.84° to +52.36°[2]Area465 sq. deg. (38th)Main stars2Bayer/Flamsteedstars21Stars with planets4Stars brighter than 3.00m1Stars within 10.00 pc (32…

سبت جزولة بلدية الاسم الرسمي جماعة جزولة الحضرية الإحداثيات 32°07′N 9°05′W / 32.11°N 9.08°W / 32.11; -9.08 تقسيم إداري  البلد  المغرب  الجهة جهة مراكش آسفي  الإقليم إقليم آسفي الحكومة  رئيس المجلس البلدي محمود كريم خصائص جغرافية ارتفاع 210 متر  عدد السكان  عدد ا…