我正在尝试从excel csv文件的“ column1”中读取值运行状况策略编号,在Web门户上的文档中搜索相同的策略,复制名称并将其附加在相应策略编号的“ column2”中。不用编写整个代码,而只是可以正常工作的代码。
import csv
try:
csvfile1 = open("E:\\Test.csv", "r")
r = csv.reader(csvfile1)
next(r, None)
for row in r:
policy_number = row[0]
print policy_number
#here Code to get the doc name from web page for each policy row
Pdf_docName="doc1.pdf"
except Exception as e:
print ("There is Issue in reading the CSV ---------",format(e))
预期输出
放入列1:-
Policy32456,
Policy89765,
Policy00034,
输出列2:-
doument1.pdf,
doument2.pdf,
doument3.pdf,