我想连接相同treeid列的大小写标记单元格。 我想要的输出应该是
(ne),0
(ko,se),1
(se,ko,ne),2
(ko,ko),3
(se,ko,ne),4
为此,我编写了以下代码:
f = open('dummy.csv','r')
hstring=f.read()
print(hstring)
for i in range(0,len(hstring)):
temp=hstring[i[3]]
for j in range(i+1,i+5):
temp1=hstring[j[3]]
if temp==temp1:
print(i[1]+","+j[1])
但是,此代码给出了以下错误:
_io.TextIOWrapper' object is not subscriptable
目前没有回答
相关问题 更多 >
编程相关推荐