import pandas as pd # create a sample dataframe df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6], 'C': [7, 8, 9]}) # reorder the columns df = df.iloc[:, [1, 2, 0]] print(df)