打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
TSV格式

TSV 是Tab-separated values的缩写,即制表符分隔值。

相对来说CSV,Comma-separated values(逗号分隔值)更常见一些。

 

TSV与CSV的区别:

1)从名称上即可知道,TSV是用制表符(Tab,'\t')作为字段值的分隔符;CSV是用半角逗号(',')作为字段值的分隔符;

2)IANA规定的标准TSV格式,字段值之中是不允许出现制表符的。

 

Python对TSV文件的支持:

Python的csv模块准确的讲应该叫做dsv模块,因为它实际上是支持范式的分隔符分隔值文件(DSV,delimiter-separated values)的。

delimiter参数值默认为半角逗号,即默认将被处理文件视为CSV。

当delimiter='\t'时,被处理文件就是TSV。

详情见这里:http://docs.python.org/library/csv.html

 

关于TSV更详细的说明:http://en.wikipedia.org/wiki/Tab-separated_values

 

A tab-separated values file is a simple text format for a database table. Each record in the table is one line of the text file. Each field value of a record is separated from the next by a tab stop character – it is a form of the more general delimiter-separated values format.

TSV is a simple file format that is widely supported, so it is often used 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 program to a spreadsheet.

TSV is an alternative to the common comma-separated values (CSV) format, which often causes difficulties because of the need to escape commas – literal commas are very common in text data, but literal tab stops are infrequent in running text. The IANA standard for TSV achieves simplicity by simply disallowing tabs within fields.

 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
如何用 Pandas 存取和交换数据?
M语言教程 · 语雀
R语言里面的文本文件操作技巧合辑
MS Office Word-公式如何实现自动编号和交叉引用?
php生成CSV文件
Word2007技巧:对使用分隔符分割的数据排序
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服