我正在寻找基于多个密钥的重复记录。我使用的是python2.5,所以不能使用Counter
。我正在更改代码以获得所需的结果,但我得到了TypeError: 'str' object is not callable
。在
start ="0,1,2,3"
mylist= [int(x) for x in start.split(',')]
key = itemgetter(*mylist)
file2 = open('temp_src.csv','rb')
f=[]
for row in file2:
if row(key) not in f: error
f.append(row)
所以您已经交换了}:
row
和{相关问题 更多 >
编程相关推荐