Reference¶
ssb_hermes package¶
ssb_hermes.functions module¶
Main function for adress matching.
The template and this example uses Google style docstrings as described at: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
- find_match(df_data, df_registry, *columns, registry_type_columns, find_postnr=False)¶
Fuction for matching adresses from data to registry.
- Parameters:
df_data (
DataFrame) – Dataframe containing the data to be matched.df_registry (
DataFrame) – Dataframe containing the registry.*columns (
str) – Columns containing the data to be matched. The first column should be the group.registry_type_columns (
str) – Columns containing the registry type.find_postnr (
bool) – Boolean value. If True, the function will try to find the postnr through the adress. Default is False.
- Returns:
A tuple containing rows to make the matched df from, filtered df with wrong postid, filtered df with fauilty adresses.
- Return type:
tuple[Any,Any,Any]- Raises:
ValueError – If the number of columns is not 5.
- get_test_data()¶
Function for getting test data.
- Returns:
Two dataframes containing test data.
- Return type:
tuple[DataFrame,DataFrame]