df = pd.DataFrame({'B':[3,1,2],'A':['b','a','c']}) print(df.sort_index(axis=1, sort_remaining=False))