Mark values of column outside the given thresholds as NaN.
Pure: data is never modified. With both thresholds None the returned frame IS data (no copy) and mask is all-False, mirroring the noop fast path of :func:~spotforecast2_safe.preprocessing.target_corruption.apply_target_corruption_policy. Otherwise a new frame is returned; the count is int(mask.sum()).
tuple[pd.DataFrame, pd.Series]: (cleaned, mask). cleaned is a new frame in which every cell mask marks True in column is NaN (or data itself when both thresholds are None). mask is a boolean Series over data.index for column only, True == outlier; the count is int(mask.sum()).