python 模糊匹配 fuzzy match
求助:我有两个csv文件,每个文件包含公司名称和各自的id,并且是大量数据,例如:文件A: COMPANY,COMPANYID;文件B:CONML,IID。
现在我需要通过模糊匹配COMPANY和CONML中公司字符串名称,并且给一个匹配分数,
然后保留每项匹配后的得分最高的一项,得出COMPANY,COMPANYID,CONML,IID;生成新的表并储存为csv文件。
COMPANYID COMPANY
23228 Cypress Group Holdings Inc
25956 Swissotel
30636 Equus Capital
33060 British Steel Ltd
36217 AXA Investment Managers UK Ltd
38125 Mizuho Bank Ltd
64264 Oman Oil Co SAOC
64457 Ta-Ho Maritime Corp
80404 Ministry of Finance Laos
86075 Autobahnen-und Schnellstrassen-Finanzierungs (Asfinag)
87794 Omnicom Capital Inc
89275 Aramex Holdings
91672 JSF Trust & Banking Co Ltd
93470 RMB (Mauritius) Ltd
93820 Kenmare Resources Plc
94206 J Alexander's Restaurants Inc
94448 Access Bank Nigeria Plc
IID CONML
1000 A & E Plastik Pak Inc
1001 A & M Food Services Inc
1002 AAI Corp
1003 A.A. Importing Co Inc
1004 AAR Corp
1005 A.B.A. Industries Inc
1006 ABC Industries Inc
1007 ABKCO Industries Inc
1008 ABM Computer Systems Inc
1009 ABS Industries Inc
1010 ACF Industries Inc
1011 ACS Enterprises Inc
1012 ACS Industries Inc
1013 ADC Telecommunications Inc.
1014 Addsco Industries Inc
1015 ADI Electronics Inc
1016 AEC Inc
1017 AEL Industries
1018 AES Technology Systems Inc
1019 AFA Protective Systems Inc
1020 AFG Industries Inc
1021 AFP Imaging Corp
上面是给的部分数据例子
页:
[1]