Skip to main content
1 of 2
M.Z
  • 263
  • 1
  • 4
  • 9

If you need an arbitrary sequence instead of sorted sequence, you could do:

sequence = ['Q1.1','Q1.2','Q1.3',.....'Q6.1',......] your_dataframe = your_dataframe.reindex(columns=sequence)

I tested this in 2.7.10 and it worked for me.

M.Z
  • 263
  • 1
  • 4
  • 9