- 表格
- 希望用pandas解决 当项目编号为1575时,项名1=项名2
尝试用
import pandas as pd
data=pd.read_excel("table")
if data["项目编号"]=="1575":
data[["项目名称1","项目名称2"]]=data[["项目名称2","项目名称1"]]
会提示报错。
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
我挺好奇你pandas导入名是啥。