SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
更改数据集 没有 warning 的正确姿势!
df.loc[ row.index, '列名']
df.loc[ df[df['代码ID']=='106'].index, '安装注册总人数'] ='XXX'
python 更新 update DataFrame
最新推荐文章于 2024-07-12 14:00:29 发布