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