def select_row(df, **kwargs):
    """Get a row from a DataFrame based upon a field value."""
    if len(kwargs) > 1:
        raise ValueError('only one keyword argument permitted')
    key = list(kwargs)[0]
    value = kwargs[key]
    row = df.copy()[df[key] == value]
    if len(row) > 1:
        raise ValueError(f'key {key} does not return a unique row')
    return row