def transform_frame(val: str):
    """
    Transforms a rating into numerical representation
    """
    if val == 'very poor':
        return 1
    if val == 'poor':
        return 2
    if val == 'fair':
        return 3
    if val == 'good':
        return 4
    if val == 'very good':
        return 5
    else:
        return -1