shifting the last column in the dataframe to the first place While this question had relative answers, I couldn't find an efficient and robust way of doing it. I have to shift the last column in my data frame to the first without disturbing any of the other columns. How should I do this ? Thanks in advance.
cols = list(df.columns)
cols = [cols[-1]] + cols[:-1]
df = df[cols]