import csv
m=csv.DictReader(open('/home/pavithra/Downloads/items_rated_utrplayers_4-6-19.csv','r'))
for i in m:
playerprofile_URL = 'App.myutr.com/player/%s'%i(["player_id"])
print(playerprofile_URL)
答案 0 :(得分:1)
您需要将i
放在所有字典索引的前面。
if i['country']=='USA' and i['gender']=='female' and i['current_ranking'] > 10:
仅编写['gender']
即可创建一个列表,它并不引用i
词典中的条目。