def mask_data(ds, mask_mapping):
    """
    Mask data values according to the mask_mapping parameter
    """
    for var, missing_value in mask_mapping.items():
        ds[var] = ds[var].where(ds[var] != missing_value)
    return ds