def q02_rename_columns(path): "write your solution here" df = q01_load_data(path) #new_header = df.iloc[1] df1 = df.rename(columns={'01 !': 'Gold', '02 !': 'Silver', '03 !':'Bronze'}) return (df1)
def q02_rename_columns(path): df = q01_load_data(path) df.rename(columns={ '01 !': 'Gold', '02 !': 'Silver', '03 !': 'Bronze' }, inplace=True) return df
def q02_rename_columns(path): "write your solution here" df = q01_load_data(path) df.rename(columns={ "01 !": "Gold", "02 !": "Silver", "03 !": "Bronze" }, inplace=True) return df
def q02_rename_columns(path): #"write your solution here" df = q01_load_data(path) df = df.rename(index=str, columns={ "01 !": "Gold", "02 !": "Silver", "03 !": "Bronze" }) return df
def q02_rename_columns(path): "write your solution here" df = q01_load_data(path) return df.rename( columns={ '01 !': 'Gold', '02 !': 'Silver', '03 !': 'Bronze', '01 !.1': 'Gold', '02 !.1': 'Silver', '03 !.1': 'Bronze', '01 !.2': 'Gold', '02 !.2': 'Silver', '03 !.2': 'Bronze', 'Total.1': 'Total', })
def q02_rename_columns(path): 'write your solution here' df = q01_load_data(path) df.columns = ['country name', '# Summer', 'Gold', 'Silver', 'Bronze', 'Total', '# Winter', 'Gold', 'Silver', 'Bronze','Total', '# Games', 'Gold', 'Silver', 'Bronze', 'Combined total'] return df
def q02_rename_columns(path): "write your solution here" df = q01_load_data(path)
def q02_rename_columns(path): "write your solution here" df = q01_load_data(path) df = df.rename(columns={'01 !':'Gold','02 !': 'Silver', '03 !': 'Bronze'}) return df