I want to order the columns of a bunch of dataframes to get a particular column first, thus
for rr in [df1,df2,df3]:
cols = ["Time"]+[col for col in rr if (col != "Time")]
rr = rr[cols]
but this fails, apparently, because rr
is a copy of each df, so the column order gets changed on rr
, but it is not changing the order of the columns of df1
, df2
, etc.
Tricky...