@classmethod
def process_ratings(cls, ratings, **kwargs):
    """ process ratings """
    ratings = super().process_ratings(ratings, **kwargs)
    if cls.user_id_field in ratings.column_names():
        ratings[cls.user_id_field] = ratings[cls.user_id_field].apply(lambda
            user_id: cls.process_user_id(None, user_id), dtype=cls.
            user_id_type, skip_na=True)
    if kwargs.get('dedupe') and cls.rating_id_field in ratings.column_names():
        ratings = ratings.unstack(cls.rating_id_field, 'ratings')
        ratings[cls.rating_id_field] = ratings['ratings'].apply(lambda x: x
            [-1], dtype=float)
        del ratings['ratings']
    return ratings
