我有一个df,看起来像这样:
| id | qty | item |
+-----+------+------+
| 001 | 700 | CB04 |
| 002 | 500 | |
| 003 | 1500 | AB01 |
我想将文本box
附加到df['item']
中,其中项不为null,因此新的df将如下所示:
| id | qty | item |
+-----+------+----------+
| 001 | 700 | CB04 box |
| 002 | 500 | |
| 003 | 1500 | AB01 box |
对于我来说,没有检查的工作解决方案
NaN
s:检查
NaN
的解决方案:将^{} 与
loc
一起使用或^{} :
相关问题 更多 >
编程相关推荐