I have two dataframes:
df1:
Variable Name Weight
Variable1 2
Variable2 .5
df2:
Variable1 Variable2
3 4
2 5
How can I multiply the weights by the numbers in each column to get the result:
df3:
Variable1 Variable2
6 2
4 2.5
You can multiply a dataframe by a series or mapped index: