def find_hpo_row(sheet, hpo, sheet_name, selective_rows,
                 analytics_type):
    """
    Finds the row index of a particular HPO site within
    a larger sheet.

    :param
    sheet (dataframe): dataframe with all of the data quality
        metrics for the sites.

    hpo (string): represents the HPO site whose row in
        the particular sheet needs to be determined

    sheet_name (string): name of the file from which the
        particular sheet of user_command type was extracted

    selective_rows (list): list of rows (potentially HPO sites)
        that are in some (but not all) of the sheets used in the
        analysis report

    analytics_type (str): the data quality metric the user wants to
        investigate

    :return:
    row_num (int): row number where the HPO site of question
        lies within the sheet. returns none if the row is not
        in the sheet in question but exists in other sheets
    """
    hpo_column_name = 'src_hpo_id'
    sheet_hpo_col = sheet[hpo_column_name]

    row_num = 9999

    for idx, site_id in enumerate(sheet_hpo_col):

        row_not_in_sheet = ((hpo in selective_rows) and
                            (hpo not in sheet_hpo_col))

        if hpo == site_id:
            row_num = idx
        elif row_not_in_sheet:
            return None

    if row_num == 9999:  # just in case
        raise NameError("{} not found in the {} sheet "
                        "from {}".format(
            hpo, analytics_type, sheet_name))

    return row_num