Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df_auto.rename(columns = {'Year': 'newName1', 'oldName2': 'newName2'}, inplace = True)
- df_auto.columns = ['newName1', 'newName2']
- ##############################################
- df_auto.rename(index = {'HaJos' : 'HaYos'}, inplace = True)
- df_auto.index.name = 'name'
- ##############################################
- cars.rename_axis('car_model', axis='index', inplace=True) # rename the axis
- cars.reset_index(inplace=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement