def beautify_legend(df, col_list):
    """ This function takes a dataframe and the list of columns that 
    will ultimately be displayed and re-formats the names so that they 
    are prettier when displayed in the legend. Returns a list of column
    names"""
    
    pretty_cols = []
    
    for col in col_list:
        new_col = col.replace("_mmbtu", "")
        new_col = new_col.replace("_unit_cost", " unit cost")
        new_col = new_col.replace("_cost", "")
        new_col = new_col.replace("kwh", "electricity usage")
        new_col = new_col.replace("kw_avg", "electricity demand")
        new_col = new_col.replace("hdd", "heating degree days")
        new_col = new_col.replace("_", " ")
        new_col = new_col.title()
        df = df.rename(columns={col:new_col})
        
        pretty_cols.append(new_col)
    
    return df, pretty_cols