def _raw_to_scaled(raw_score, conversion_table):
    """ Convert raw score to a categorical, scaled value

    :param raw_score: int, raw score on the test of interest
    :param conversion_table: pd dataframe, being the conversion table for the test of interest
    :return: categorical, scaled score
    """

    scaled_scores = conversion_table.iloc[:,0]
    lower_values = conversion_table.iloc[:,1]
    upper_values = conversion_table.iloc[:,2]

    for scaled_score, lower_value, upper_value in zip(scaled_scores, lower_values, upper_values):
        if lower_value <= raw_score <= upper_value:
            return scaled_score