Life Expectancy and GDP data: pandas rename does not work on jupyter notebook

In following the instructions to rename the column, it appears that it works in cell 48 but then when I use df.head() to check it in the next cell, it goes back to its old name. Did I do something wrong?

Try the following:

df.rename(columns={“Life expectancy at birth (years)” : “LEABY”}, inplace=True)

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.