我有这样如何相互
DF1: Col1 Col2
Row1 A 30
Row2 B 40
DF2: Col1 Col2
Row1 A 10
Row2 B 5
现在我想乘DF1.Col2和DF2.Col2并得到这样
输出2帧的数据乘以2只大熊猫的数据帧2列Out: Col1 COl3
Row1 A 300
Row2 B 200
我该怎么做。我试着波纹管代码,但它不工作
DF1[:,'Col3'] = pd.Series(DF1.Col2.astype(int)*DF2.Col2.astype(int),index=DF1.index)
这直接与波纹管错误: 类型错误:unhashable型
尝试DF1 ['COL3] = DF1.Col2.astype(int)* DF2.Col2.astype(int) –