[Loc vs Pandas Slicing] Important fix to prevent possible errors. #Python #Pandas
# Use:
medalslondon.loc[:,'Total'] = medalslondon['Gold'] + medalslondon['Silver'] + medalslondon['Bronze']
# Instead of:
medalslondon['Total'] = medalslondon['Gold'] + medalslondon['Silver'] + medalslondon['Bronze']