import pandas as pd
def handle_excel(逻辑表, txt)-> tuple:
逻辑表 = r'C:\输入文件\客诉单转递逻辑表.xlsx'
txt ="11"
df = pd.read_excel(逻辑表, header=1)
df = df.fillna("")
for i,row in df.iterrows():
if (row["确认关键字1"] in txt) and (row["确认关键字2"] in txt) and (row["确认关键字3"] in txt) and (row["否定关键字1"]=="" or row["否定关键字1"] not in txt) and (row["否定关键字2"]=="" or row["否定关键字2"] not in txt) and (row["否定关键字3"]=="" or row["否定关键字3"] not in txt):
print(row["转递"])
info = row.values.tolist()
print(type(info))
return info
return ["不存在"]
'in <string>' requires string as left operand, not int
这是我的代码,主要想实现根据表里6个关键字进行匹配结果,但是运行时会出现 如上错误提示,求帮忙解决