def format_url(df):
    """
    Replace index column values with html anchor pointing at URL in URL column
    then drop URL column

    Parameters
    ----------
    df : DataFrame
        Data frame on which to perform replacment
    Returns
    -------
    df : DataFrame
        Data Frame with index column values turned into URLs
    """

    ix_col = df.index.name
    df = df.reset_index()
    df[ix_col] = df.apply(
        lambda x: f'<a href="{x["URL"]}">{x[ix_col]}</a>', axis=1
    )
    df = df.drop("URL", axis=1)

    df = df.set_index(ix_col)

    return df