def _parse_header_row(row, **options):
    """Parse the header row of a table.

    If a column spans multiple cells, then duplicate values are returned
    for each. Duplicated columns are appended with ``suffix`` and index
    for each repeat.
    
    Parameters
    ----------
    row : BeautifulSoup Tag object
        A <tr> tag from the html, all of whose cells are <th> tags

    suffix : string, optional (default='__')
        The seperator between column name and index for multi-cols.

    Returns
    -------
    columns : list
        The headers as a list.

    """ 

    suffix = options.pop('suffix', '__')

    # If exists <td> tags then not a header row
    if row.find_all('td'):
        raise ValueError("`row` is not a table header.")
    
    columns = []
    for x in row.find_all('th'):
        colspan = int(x.attrs.pop('colspan', 1))
        if colspan > 1:
            columns += \
                [x.text.strip() + suffix + str(i) for i in range(colspan)]
        else:
            columns += [x.text.strip()]

    return columns