# inplace = True --> modify original data data.set_index('Year', inplace=True) # equals to data = data.set_index('Year')