🌈 搜索
📅  最后修改于: 2022-03-11 14:45:15.293000             🧑  作者: Mango
df[df['A'] > 2]['B'] = new_val # new_val not set in df # rewrite it as below df.loc[df['A'] > 2, 'B'] = new_val