I have a dataframe with my index as years, and one column of integer entries. I want to change my index into column headings. I have this structure for several small dataframes, which I will attach to a larger dataframe.
1
0
2021 4365
2020 5812
2019 6773
2018 6681
2017 6809
2016 6776
2015 6587
2014 5978
How can I turn this into:
2021 2020 2019 2018 2017 2016 2015 2014
Amount 4365 5812 6773 6681 6809 6776 6587 5978
I'm afraid I don't know where to begin, and I can't find any examples of this online. Any help would be greatly appreciated.