pandas move column to position code example Example: pandas move columns around df = df[['a', 'y', 'b', 'x']]