Anyone can help me understand why Inflation appears in the first column and not second and how to change that? I tried different methods and none seems to work. Thank you!
I tried using loc but the output was the same.
Anyone can help me understand why Inflation appears in the first column and not second and how to change that? I tried different methods and none seems to work. Thank you!
I tried using loc but the output was the same.
To reorder a DataFrame
, use:
inflation_table = inflation_table.reindex(columns=['Year', 'Inflation'])