'Replace string values in col.str_vals and set masks'

def _set_masks(self, cols):

    if self.fill_values:
        for col in (col for col in cols if col.fill_values):
            col.mask = numpy.zeros(len(col.str_vals), dtype=numpy.bool)
            for (i, str_val) in ((i, x) for (i, x) in enumerate(col.str_vals) if (x in col.fill_values)):
                col.str_vals[i] = col.fill_values[str_val]
                col.mask[i] = True
