def _convert_to_integer(srs, d):
    """Convert series to integer, given a dictionary.
    
    Args:
        srs (pd.Series): A series.
        d (dict): A dictionary mapping values to integers
    
    Returns:
        pd.Series: An series with numeric values.
    
    """
    return srs.map(lambda x: d[x])