I have a DataFrame with an index column as [0, 1,2,3]. I would like to change it to ['Q1','Q2','Q3','Q4']. How do I do this? I do not want to introduce a new column but change index only.
I triedqtrs = ['Q1', 'Q2', 'Q3', 'Q4']anddf.reindex(qtrs)where df is the DataFrame.
It does not work!