pandas.where function
see
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.where.html
The source:
https://github.com/pandas-dev/pandas/blob/v1.2.4/pandas/core/generic.py#L9147-L9288
这个函数的声明是:
DataFrame.
where
(cond, other=nan, inplace=False, axis=None, level=None, errors='raise', try_cast=False)
这里的other对应cond为False的情况。
inplace为True会直接在DataFrame对象上操作,返回None:
Returns
-------
Same type as caller or None if ``inplace=True``.