我有数据框:
data= pd.DataFrame({"A": [1, 0, 5],"B":[0,0,5],"C":[0,0,9]})
然后我想将其转换为:
data= pd.DataFrame({"A": [A, '', ''],"B":['','',B],],"C":['','','C']})
然后我想将列值合并到一个新列中:
data= pd.DataFrame({"A": [A, '', ''],"B":['','',B],"C":['','','C'],"combine":['A','','B_C']})
任何人都可以帮助我吗?
谢谢