📜  迭代行时添加一列 pandas - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:21.843000             🧑  作者: Mango

代码示例2
mask = (df['Qty'] == 1) & (df['Price'] == 10)
df.loc[mask, 'Buy'] = 1