def fuzzy_row_key(rdata, col):
    """
    Lookup correct index using closest col name.
    If the col has trailing Nones, these are ignored
    return -- key
    """
    try:
        col = col[:col.index(None)]
    except ValueError:
        pass
    if len(col) == 1:
        col = col[0]
    return col
