Suppose 'df' is the dataframe. Then you can use the following code to put the column 'A' as the last column.
cols = [col for col in df.columns if col != 'A'] df = df[cols + ['A']]
cols = [col for col in df.columns if col != 'A']
df = df[cols + ['A']]