python - 获取“ValueError:无法从重复轴重新索引:”因为我想根据另一列的值乘以特定列
问题描述
我想根据另一列的值乘以某些列。
merged.loc[merged.check.str.contains('1'), 'price'] = merged['price']*100000.0
merged.head()
但我收到了这个错误。
ValueError: cannot reindex from a duplicate axis
解决方案
推荐阅读
- database - 从包含一些丢失文件的数据目录中恢复 PostgreSQL 数据
- raspberry-pi - 使用单声道在 linux (Raspberry Pi) 上使用网络运行 dot net 程序集
- javascript - jQuery 在新的触发之前等待一个函数完成
- c++ - 交换链表的最后一个节点将进入无穷大——C++
- javascript - 在构造函数中同步加载图像
- r - 将空格分隔的文本文件转换为命名向量以计算 HWE
- javascript - Nuxt.JS “预期参数 accessToken” 内容丰富
- css - 如何在 MDN 上阅读 CSS 语法
- java - 我在递归实现字符串的子字符串方法时遇到了麻烦
- docker - 尝试将数据处理分布在集群中,然后将其聚合到主服务器中