首页 > 其他 > 详细

pandas.where function

时间:2021-04-14 23:44:06      阅读:23      评论:0      收藏:0      [点我收藏+]

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(condother=naninplace=Falseaxis=Nonelevel=Noneerrors=‘raise‘try_cast=False)

这里的other对应cond为False的情况。

inplace为True会直接在DataFrame对象上操作,返回None:

Returns
-------
Same type as caller or None if ``inplace=True``.

pandas.where function

原文:https://www.cnblogs.com/LeoGIS/p/14659750.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!