How can I sort a multilayer dictionary by rearrange the second layer dictionary's keys? I think an example would be a better way to present it.
The original multilayer dictionary:
{'John': {'Low >3 days': 3,'Low >1 day': 2,'High <1 day': 2,'High >3 days': 3,'Low <1 day': 1,'High >1 day': 1},'Mary': {'High >1 day': 5,'High >3 days': 1,'Low <1 day': 0, 'Low >1 day': 2, 'Low >3 days': 9, 'High <1 day': 5}}
I am trying to arrange the second layer dictionary with change the first layer dictionary and move the second layer key-value pair together at the same time. The order of the second layer dictionary key is High <1 day, Low <1 day, High >1 day, Low >1 day, High >3 days, Low >3 days.
The expected output would be as follow:
{'John': {'High <1 day': 2,'Low <1 day': 1,'High >1 day': 1,'Low >1 day': 2,'High >3 days': 3,'Low >3 days': 3},'Mary': {'High <1 day': 5,'Low <1 day': 0,'High >1 day': 5,'Low >1 day': 2,'High >3 days': 1,'Low >3 days': 9}}