I extracted the index values from a pandas dataframe and want to add them as a column in a new dataframe. But python throws up an error indicating that the index that was ex