Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Fuzzy Match Product Names | Fuzzy Matching and Similarity Detection
Data Cleaning Techniques in Python

bookChallenge: Fuzzy Match Product Names

Tehtävä

Swipe to start coding

You are given two lists of product names:

  • catalog_names — the official catalog entries;
  • incoming_names — names provided by an external supplier with slight variations.

Your goal is to assign each supplier product name to the closest matching catalog name using the difflib library from the Python standard library.

Follow these steps:

  1. For each element of incoming_names, compare it with every element of catalog_names.
  2. Use the SequenceMatcher class from the difflib module to calculate similarity scores.
  3. For each incoming name, find the catalog entry with the highest similarity score.
  4. Store all matches in a dictionary named matched_products, where keys are supplier names and values are the closest catalog names.

Make sure that the variable matched_products is declared and contains the correct matches.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 3
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Can you explain this in simpler terms?

What are the main benefits or drawbacks?

Can you give me a real-world example?

close

bookChallenge: Fuzzy Match Product Names

Pyyhkäise näyttääksesi valikon

Tehtävä

Swipe to start coding

You are given two lists of product names:

  • catalog_names — the official catalog entries;
  • incoming_names — names provided by an external supplier with slight variations.

Your goal is to assign each supplier product name to the closest matching catalog name using the difflib library from the Python standard library.

Follow these steps:

  1. For each element of incoming_names, compare it with every element of catalog_names.
  2. Use the SequenceMatcher class from the difflib module to calculate similarity scores.
  3. For each incoming name, find the catalog entry with the highest similarity score.
  4. Store all matches in a dictionary named matched_products, where keys are supplier names and values are the closest catalog names.

Make sure that the variable matched_products is declared and contains the correct matches.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 3
single

single

some-alt