To change the order of Python Pandas DataFrame columns, we can pyut the columns in a different order in a brackets.
For instance, we write
df = df[['mean', '0', '1', '2', '3']]
to add an array with the column names we want in the brackets to reorder them as listed.
And then we reassign the returned dataframe to df
.