Association Rules with Python (coded dataset)
Create a dictionary that contains the coded variables as keys and the item names as values.
So it would look like:
dicty = {4: &quot;bread&quot;, 7: &quot;milk&quot;, 9: &quot;toothpaste&quot;}

Constructing dictionaries in python is really easy if you have them in a table or excel spreadsheet.
dicty = {i:j for i,j in zip(coded_list,normal_list)}


where coded_list is the list of variables in numbers, and normal_list is the list of variables in their categorical names.
Once you have a dictionary you can simply convert them like this:
name = dicty[9]

and it should return toothpaste for name.