Run
import pandas as pd #initialize a dataframe df = pd.DataFrame( [[21, 72, 67], [23, 78, 62], [32, 74, 54], [52, 54, 76]], columns=['a', 'b', 'c']) #change order of columns df_new = df[['a', 'c', 'b']] #print new dataframe print(df_new)
Output