move columns in dataframe python code example
Example 1: how to move columns in a dataframen in python
df = df[['column1', 'column2','column3']]
Example 2: pandas move columns around
df = df[['a', 'y', 'b', 'x']]
df = df[['column1', 'column2','column3']]
df = df[['a', 'y', 'b', 'x']]