how to move columns in a dataframen in python

df = df[['column1', 'column2','column3']]

Here is what the above code is Doing:
1. We’re creating a new DataFrame called df_subset that contains only the columns we want.
2. We’re using the [] notation to select the columns we want.
3. We’re putting the column names in a list.
4. We’re assigning the new DataFrame to the variable df_subset.