首页 > 解决方案 > 获取“ValueError:无法从重复轴重新索引:”因为我想根据另一列的值乘以特定列

问题描述

我想根据另一列的值乘以某些列。

   merged.loc[merged.check.str.contains('1'), 'price'] = merged['price']*100000.0
   merged.head()

但我收到了这个错误。

ValueError: cannot reindex from a duplicate axis

标签: pythonpython-3.xpandas

解决方案


推荐阅读