我正在处理包含多列的制表符分隔文件。每列包含超过3000条记录。如何将列值存储在变量中
Column1 Column2 Column3 Column4
1000041 11657 GenNorm albumin
1000043 24249 GenNorm CaBP
1000043 29177 GenNorm calcium-binding protein
1000045 2006 GenNorm tropoelastin
问题:使用Python,如何读取的标签分离文件,并在一个单一的变量中的每个柱(用其记录)存储。使用“打印”打印出特定的列(S)
初步代码:我用这个代码到目前为止读取TSV文件
import csv
Dictionary1 = {}
with open("sample.txt", 'r') as samplefile:
reader = csv.reader(samplefile, delimiter="\t")
问题。鉴于5线输入,你想要输出什么? – abarnert 2014-11-25 02:46:37
我编辑了这个问题......不要注意点... – MEhsan 2014-11-25 02:49:43
你编辑的问题仍然没有告诉我们你想要的输出是什么。 – abarnert 2014-11-25 02:51:40