def make_ratings_hash(ratings):
    
    """
    Make a hashtable of ratings indexed by itemId and pointing to
    the vector (genres, decade) that fully characterize an item.
    """
    
    rhash = {}
     
    # For every rating, check if the relevant item is already in the map.
    # If not, add it to the map. Key is item_id, mapped value is the vector
    # consisting of the possible genres and the decade of the movie.
    
    for row_indx, itemid in ratings['itemid'].iteritems():
        if itemid not in rhash:
            itemData = ratings.ix[row_indx, 'Action' : 'decade']
            rhash[itemid] = itemData
    return rhash