def parse_query_counts(data):
    """
    Data is a dataframe with columns "query_id" and "taxa".
    Parses the count information from "query_id" into
    a separate "query_counts" column. Returns a dataframe
    with "query_id", "taxa" and "query_counts" columns.
    """
    data = data.copy()
    data["query_counts"] = data["query_id"].str.split(
        "_", expand=True)[1]
    return data