SyntaxFix
Write A Post
Hire A Developer
Questions
Here is a generic set of code that I frequently use to rearrange the position of columns. You may find it useful.
cols = df.columns.tolist() n = int(cols.index('Mid')) cols = [cols[n]] + cols[:n] + cols[n+1:] df = df[cols]