In [1]:
import pandas as pd
import numpy as np
from fuzzywuzzy import process
from fuzzywuzzy import fuzz
In [28]:
po_df = pd.read_excel("lst-Purchase_Orders-2019_Q3-BASREC.xlsx", sheet_name="POs")
In [29]:
vendors = po_df.PO_Vendor_Name.unique()
In [27]:
len(vendors)
Out[27]:
166
In [30]:
fuzzyMatch = []
for query in vendors:
fuzzyMatch.append(process.extractOne(query=query, choices=vendors, scorer=fuzz.token_sort_ratio))
In [31]:
len(fuzzyMatch)
Out[31]:
166
In [11]:
vendors
Out[11]:
array(['MCPS MARINE CATHODIC PROTECTION SYSTEMS LTD',
'AMERICAN FASTENER TECHNOLOGIES CORP.',
'AQUA INTERNATIONAL PTE LTD', 'ELECTRIDUCT CABLE MANAGEMENT',
'W & O SUPPLY INC.', 'AMAZON', 'PANNIER CORPORATION',
'WELDABILITY', 'AIRBLAST SAUDI TRADING & INDUSTRIAL EST.',
'DREAM MARINE SHIP SPARE PARTS TRADING LLC', 'MAGELLAN METALS LLC',
'M/S WINCHES INC.', 'SMALL BOATS DIVISION',
'PIERCE ALUMINUM COMPANY INC', 'SHORELINK INTERNATIONAL',
'AAH ACQUISITTION LLC DBA ALL-AMERICAN HOSE,LLC',
'TEAMS (BAHRAIN)', "A'AZ AL AWTTAN.",
'ABDALI ESSA AL NOOH & SONS CO. W.L.L.',
'SYSCON TRADING & MECHANICAL SERVICES CO. W.L.L.',
'M.H.AL MAHROOS B.S.C.', 'YATEEM OXYGEN', 'Y.K. ALMOAYYED & SONS',
'FREE LAND TRADING & CONTRACTING',
'NASIF & KHANSAHEB ABDULHUSEIN & BROS BROS. W.L.L',
'D.K. KARANI & BROS. W.L.L', 'FALCON TRADING CO.W.L.L',
'RAAS OILFIELD SERVICES AND SUPPLIES W.L.L.',
'GHULAM MOHAMMED CO.W.L.L', 'ATLAS ELECTRICAL TRADING W.L.L.',
'GULF MARINE SERVICES', 'ARABIAN TRADING EST.', 'ELECTROMEC',
'HEMPEL PAINTS (BAHRAIN) SPC',
'TYLOS BUILDING MATERIALS EST.W.L.L.',
'AWAL REFRIGERATION &AIRCONDITIONING',
'OILFIELD & TECHNICAL SUPPLIES CENTRE W.L.L.',
'INTERNATIONAL AGENCIES CO.LTD.', 'YUSUF BIN AHMED KANOO W.L.L.',
'AL FATEH INDUSTRIAL SUPPLIERS', 'PRIDE ALDIAR HYDRAULIC W.L.L.',
'NASS COMMERCIAL.', 'MYFA GLOBAL GENERAL TRADING W.L.L.',
'JOTUN PAINTS', 'AL ALIAA PLASTIC FACTORY W.L.L.',
'2000 MARINE STORES', 'BAHRAIN GAS W.L.L',
'LULU STORE MAINTENANCE EQUIPMENT W.L.L', 'BABASONS',
'HATCON INDUSTRIAL SERVICES W.L.L.', 'KANOO STATIONERY CO.W.L.L.',
'MARS FURNITURE W L L', 'AL FOUZ SERVICES CO.W.L.L.',
'AL DIYAFAH MARINE SERVICE W.L.L', 'MOHAMED A.RAHMAN AL BAHAR',
'PENIEL ELECTICAL',
'MARINE AND INDUSTRIAL PUMP REPAIR (GULF) S.P.C',
'NATIONAL RADIATOR INDUSTRIES W.L.L', 'FLUID TECH TRADING & EST.',
'KHAYBER FIRE & SECURITY SYSTEMS W.L.L.', 'ALSALAM', 'BLASTMASTER',
'SAAJ INTERNATIONAL TRADING EST.',
'TAWASEL TAILORING AND BOUTIQUE', 'BAHRAIN WORKSHOP CO. (W.L.L)',
'GULF COMPUTER SERVICES W.L.L.', 'METALS INTERNATIONAL SPC',
'AL DIYAR HYDRAULIC', 'MANAMA AUCTIONS W.L.L.',
'AL BWARDY INDUSTRIAL & TECHNICAL EQUIPMENTS CO. W.L.L.',
'CONTINENTAL OFFICE EQUIPMENT & SYSTEMS', 'AL MADAEN FURNISHING',
'AL MANAR CARGO.',
'DAR AKHBAR AL KHALEEJ PRESS & PUBLISHING W.L.L.',
'KOOHEJI INDUSTRIAL SAFETY', 'AL HILAL GROUP',
'UNIVERSAL LABORATORIES (BAHRAIN) W.L.L', 'A.A. KOTHAMBAWALA CO.',
'AL ERADAH CHEMICALS EST.', 'TECHNO CHEM TRADING.', 'ADVANCED PC',
'MIKNAS ELECTRICAL', 'GULF COLD STORES & ICE PLANT CO.',
'PAN GULF INTERNATIONAL TRADING', 'MASKATI BROS & CO.BSC (C)',
'AWAL PLASTICS L.L.C.',
'AL-NISR ALUMINIUM & METAL FABRICATION CO. LTD',
'EBRAHIM K.KANOO B.S.C.(C)', 'THE BAHRAIN PETROLEUM COMPANY .',
'OMRAN PRINTING PRESS', 'GOLTENS BAHRAIN Co. SPC',
'INTERNATIONAL PAINT (GULF) LLC', 'UNION STATIONERY CO.',
'BANZ TRADING & CONTRACTING W.L.L', 'GEORGIA UNIFORMS',
'ABDULLA YOUSIF FAKHRO & SONS', 'EVERON TRADING & SERVICES WLL',
'KOOHEJI AUTOMOTIVE CO.', 'DELMA MARINE',
'DELMON PETROLEUM SUPPLY.', 'MAHDI SAEED MAHDI EST', 'KBH KAANUUN',
'INK8 ADVERTISING & PROMOTION', 'TOYOTA PLAZA',
'MUHARRAQ ENGINEERING SERVICES B.S.C.(C)',
'FINCANTLERI MARINE SYSTEMS NORTH AMERICA',
'INNOVEX CARGO SERVICES', 'AL REEM GATE CONSTRUCTION',
'AL HOTY ANALYTICAL SERVICES', 'GLOBAL ALIGNMENT FZC',
'HULL DIVING SERVICES W.L.L.', 'AL JAZEERA SHIPPING CO. W.L.L',
'ABU AMER EQUIPMENT HIRING(MISTER MACHINE).',
'SULTAN AIR CONDITIONING & REFRIGERATION SERVICES',
'RUBBER WORLD.', 'MP FILTRI UK LTD.', 'STRAIGHT POINT',
'ARABIAN INTERNATIONAL SERVICES COMPANY W.L.L.', 'VOYAGE MARINE.',
'MASTER SYSTEMS W L L', 'FELMAR MAINTENANCE SERVICES W.L.L',
'TWISER AIR CONDITIONING CO.W.L.L (AJ A/C)', 'AIRMECH W.L.L.',
'INTEGRATED PROCUREMENT TECHNOLOGIES',
'HOLMAN FENWICK WILLAN MIDDLE EAST LLP',
'MUHARRAQ DIVING SERVICE.', 'ALPHA FIRE SERVICES W.L.L.',
'DOTS MEDIA INTERNATIONAL W.L.L',
'ESMAELY LENZOHM ELECTRICAL CO. W.L.L.',
'CORROSION & TECHNICAL SERVICES W.L.L.',
'SURVITEC SAFETY SOLUTIONS NORWAY AS',
'MODERN MECHANICAL, ELECTRICAL & TRANSPORT CO.W.L.L(M.M.E.T C',
'NIDUKKI', 'DYNAMICS SQUARE',
'HYDRAPRO TRADING SERVICES CO.W.L.L.', 'KADAR CONTRACTING S.P.C.',
'MISTER MACHINE B.S.C.C.', 'NORTHSTAR TECHNOLOGIES',
'ROYAL PHOENCIA HOTEL', 'SAAR ALUMUNIUM COMPANY W.L.L',
'AWAL GULF MANUFACTURING CO. BSC', 'DREAM POOLS', 'BAHRAIN BOURSE',
'BAHRAIN CLEAR B.S.C.(C)', 'ARIES GROUP OF COMPANIES',
'AL HINA UPHOLSTERY & CURTAINS.', 'REINTJES MIDDLE EAST LLC',
'TECHNO BLUE TRADING COMPANY SPC', 'LSS TECHNOLOGIES',
'SURFACE TECHNOLOGIES CORPORATION', 'BUREAU VERITAS',
'GULF AGENCY COMPANY W.L.L.', 'NEWTECH INTERNATIONAL W.L.L',
'AL HARAM FIBRE GLASS S.P.C.',
'WARTSILA SHIPS REPAIRING & MAINTENANCE', 'LATI FOR SERVICES',
'LOTUS HOTEL', 'KPMG FAKHRO', 'RMA PIPELINE EQUIPMENT',
'ABU KHAMSEEN', 'AL MANARATAIN CO. & ALI AL SHAAB GROUP W.L.L',
'BAHRAIN INTERNATIONAL CARGO SERVICES W.L.L.',
'MODERN GLOBAL CLEANING CO. W.L.L.', 'DELMON PRECAST',
'D 3 DIGITAL DATA DIMENSIONS IT SOLUTION',
'TURK MECHANICAL INDUSTRIES CO. W.L.L.'], dtype=object)
In [ ]:
Content source: Hussainaly/hello-world
Similar notebooks: