def normalize_dataframe(df):
    """ Converts the total occurrences and total docs into percentages"""
    df.total_occurrences = df.total_occurrences * 100 / df.total_occurrences.sum()
    df.total_docs = df.total_docs * 100 / df.total_docs.sum()
    return df