DataImputer.impute_mask¶
-
DataImputer.
impute_mask
(df, mask, produce_nans=False, inplace=False, progress_callback=None) Imputes values within a dataframe from a given mask using the underlying synthesizer.
- Parameters
df (pd.DataFrame) – The data in which to impute values.
mask (pd.DataFrame) – A boolean mask that contains True for those values to be imputed, and False for the values to remain unchanged.
produce_nans (bool, optional) – Whether to produce nans when imputing values for given mask. Defaults to False.
inplace (bool, optional) – If True, modifies the given dataframe in place. Defaults to False.
- Return type
DataFrame
- Returns
The DataFrame with masked values imputed.