date – How to reverse the column order of a Dataframe with Python

Assuming that the column names of your DataFrame (DF) are "fruit", "vitamin" and "price", in that order. You can rearrange as follows:

df = df[['preço', 'vitamina', 'fruta']]

In other words, you must pass a listing filter or rearrange with the column names you need / want.