Mar-19-2019, 04:42 AM
You can specify the order of columns as you want, e.g.:
x=pd.DataFrame({'a': [1,2,3], 'b':[3,4,5], 'c':[5,6,7]}) x = x[['b','c','a']]
Output: b c a
0 3 5 1
1 4 6 2
2 5 7 3