# 8.18:  Use .reindex() to reorder the columns (again, with axis=1 on the DataFrame to 'float',
# 'num', and 'terxt' (deliberately misspell 'text').  Note that the 'terxt' column springs into
# existence with empty values.

import pandas as pd

data = [
    [1, 2.5, 'apple'],
    [2, 3.0, 'banana'],
    [3, 4.2, 'orange']
]

df = pd.DataFrame(data, columns=['num', 'float', 'text'],
                        index=['c', 'b', 'a'])


df = df.reindex(['float', 'num', 'terxt'], axis=1)

print(df)

