lvphj / epydemiology

Python code for epidemiologists – eventually
MIT License
8 stars 2 forks source link

Addresses issue #62 where phjCleanUKPostcodeVariable() fails #68

Closed lvphj closed 7 months ago

lvphj commented 7 months ago

Error originated in the phjGetBestAlternativePostcodes() function. Basically, a scratch dataframe containing all the misformed postcodes was created and an attempt to calculate the minimum Damerau-Levenschtein distance was calculated using a lambda function. If the scratch dataframe was an empty dataframe (i.e. no incorrect postcodes identified), the ValueError exception was raised. This was addressed by checking that the scratch dataframe was not empty before attempting to calculate min DL distances.

lvphj commented 7 months ago

Merged into master branch.