Placerstores¶
flowtask.components.PlacerStores
¶
PlacerStores
¶
PlacerStores.
Overview
The PlacerStores is used to match PlacerAI stores with Stores tables at different schemas.
Properties
.. table:: Properties :widths: auto
+------------------+----------+-----------+-----------------------------------------------------------------------------------+ | Name | Required | Type | Description | +------------------+----------+-----------+-----------------------------------------------------------------------------------+ | location_field | Yes | str | The name of the column to be used for matching. | +------------------+----------+-----------+-----------------------------------------------------------------------------------+
Return A New Dataframe with all stores matching using a Fuzzy Search Match.
find_best_match
¶
Find the best fuzzy match for a given address.
Parameters: - address (str): The address to match. - choices (list): List of addresses to match against. - threshold (int): Minimum similarity score to consider a match.
Returns: - best_match (str) or None: The best matching address or None if no match meets the threshold. - score (int): The similarity score of the best match.