Converting dict to OrderedDict

I am having some trouble using the collections.OrderedDict class. I am using Python 2.7 on Raspbian, the Debian distro for Raspberry Pi. I am trying to print two dictionaries in order for comparison (side-by-side) for a text-adventure. The order is essential to compare accurately.
No matter what I try the dictionaries print in their usual unordered way.

Label python data points on plot

I searched for ages (hours which is like ages) to find the answer to a really annoying (seemingly basic) problem, and because I cant find a question that quite fits the answer I am posting a question and answering it in the hope that it will save someone else the huge amount of time I just spent on my noobie plotting skills.

Sorting columns in pandas dataframe based on column name

I have a dataframe with over 200 columns. The issue is as they were generated the order is ['Q1.3','Q6.1','Q1.2','Q1.1',……] I need to sort the columns as follows: ['Q1.1','Q1.2','Q1.3',…..'Q6.1',……] Is there some way for me to do this within Python? Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers … Read more