This looks good, I made the following changes to get the WHO codes assigned correctly:
Changed none_to_empty_str to recognize any null values with pd.isna instead of just if x is None:. This was because a few columns in the input data had numeric null values (nan) not str null values (None).
Also added data types to the importing of the EURO who_coding file. The columns prov_category and prov_subcategory were being read in as numeric columns and this was killing the data merging.
Updated the file name in preprocess.py to EURO from Euro so that we are consistent across the whole routine.
This looks good, I made the following changes to get the WHO codes assigned correctly:
Changed
none_to_empty_str
to recognize any null values withpd.isna
instead of justif x is None:
. This was because a few columns in the input data had numeric null values (nan
) notstr
null values (None
).Also added data types to the importing of the EURO
who_coding
file. The columnsprov_category
andprov_subcategory
were being read in as numeric columns and this was killing the data merging.Updated the file name in
preprocess.py
toEURO
fromEuro
so that we are consistent across the whole routine.