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.mask
withaxis=1
. other
: Scalar, DataFrame, Series, 1 or 2-D ArrayNone
, - Data types inother
must match corresponding entries in DataFrame.None
or omitting argument defaults to the respectiveNA
value for each type.
Note
DataFrame can contain categorical data if other
is a scalar.