I want to rename the index from 'Country' to 'Continent'. What should I change in this code to rename the index?
    answer=answer_1c()
    answer['Population_Estimate'] = answer['Energy Supply'] / answer['Energy Supply per Capita']
    answer['Population_Estimate'] = np.float64(answer['Population_Estimate'])
    ContinentDict  = {'China':'Asia', 
                      'United States':'North America', 
                      'Japan':'Asia', 
                      'United Kingdom':'Europe', 
                      'Russian Federation':'Europe', 
                      'Canada':'North America', 
                      'Germany':'Europe', 
                      'India':'Asia',
                      'France':'Europe', 
                      'South Korea':'Asia', 
                      'Italy':'Europe', 
                      'Spain':'Europe', 
                      'Iran':'Asia',
                      'Australia':'Australia', 
                      'Brazil':'South America'}
    answer.rename(index=ContinentDict,inplace=True)
    answer.reset_index(inplace = True)
    functions = ['size', 'sum', 'mean', 'std']
    result = answer[['Country', 'Population_Estimate']].groupby('Country').agg(functions)
    return(result)
