pd.DataFrame.mask¶
pandas.DataFrame.mask(cond, other=np.nan, inplace=False, axis=1, level=None, errors='raise', try_cast=NoDefault.no_default)
Supported Arguments¶
cond: Boolean DataFrame,Boolean Series,Boolean Array- If 1-dimensional array or Series is provided, equivalent to Pandas
df.maskwithaxis=1. other: Scalar, DataFrame, Series, 1 or 2-D ArrayNone, - Data types inothermust match corresponding entries in DataFrame.Noneor omitting argument defaults to the respectiveNAvalue for each type.
Note
DataFrame can contain categorical data if other is a scalar.