【发布时间】:2023-01-12 15:42:58
【问题描述】:
我有 2 个 Excel 文件,其中包含名称作为唯一的列:
File 1: file1.xlsx
Names
Vinay adkz
Sagarbhansali
Jeffery Jonas
Kiara Francis
Dominic
File 2: file2.xlsx
Names:
bhansali Sagar
Dominic
Jenny
adkzVinay
Sample Output:
I want to match the names in file 1 with names in file 2, and i am trying to get an output like the below :
Names File2Matchname. Match%
Vinay adkz. adkzVinay. 98%
Sagarbhansali. bhansali sagar 97%
Jeffery Jonas NA 0%
Kiara Francis NA 0%
Dominic Dominic 100%
上面的逻辑是否可以通过任何逻辑到达 python ?
我尝试在 Excel 中执行此操作,但 vlookup 对匹配% 没有帮助。我知道这对于使用表相似度的 python 是可能的,但我无法获得可以到达输出的逻辑。
任何帮助将非常感激。
【问题讨论】:
-
你试过什么?可重现代码在哪里?
-
我已经在 Excel 中尝试使用普通的 vlookup 我不知道如何在 python 中完成它。
标签: python-3.x