Pandas has reindex method that does it. You just need to give a list with the column names in the order you wish:
columnsTitles=["B","A"]
df=df.reindex(columns=columnsTitles)
Log in to ask questions about Matlab publicly or anonymously.
Pandas has reindex method that does it. You just need to give a list with the column names in the order you wish:
columnsTitles=["B","A"]
df=df.reindex(columns=columnsTitles)
Pandas has reindex method that does it. You just need to give a list with the column names in the order you wish:
columnsTitles=["B","A"]
df=df.reindex(columns=columnsTitles)