I have the following DataFrame (df):
DataFrame
df
import numpy as np import pandas as pd df = pd.DataFrame(np.random.rand(10, 5))
Just flipping helps often.
df[df.columns[::-1]]
Or just shuffle for a look.
import random cols = list(df.columns) random.shuffle(cols) df[cols]