I am trying to loop through the titles of a dataframe and change them to the last character of the title so then I can convert them to months. I want a loop because I get data each month and I want to have it automated so I don't manually add the title names. When I print the titles this is what I get:
list(df)
['MCA036_LIFETIME_1', 'MCA036_LIFETIME_2', 'MCA036_LIFETIME_3', 'Total']
I would like for the titles to be:
list(df)
['January','February','March','Total']
Any guidance would be greatly appreciated.