df1
ASSET | PRICE |
---|---|
BTC | 50000 |
ETH | 4000 |
ADA | 3 |
XRP | 1 |
df2
ASSET | AMOUNT |
---|---|
BTC | 1 |
ETH | 10 |
ADA | 100 |
SOL | 50 |
XRP | 40 |
BNB | 200 |
Given these 2 dataframes I would like to add the amount column from df2 to df1 only if the asset is the same. End result for df1 would need to be (only keep assets in df1):
df1
ASSET | PRICE | AMOUNT |
---|---|---|
BTC | 50000 | 1 |
ETH | 4000 | 10 |
ADA | 3 | 100 |
XRP | 1 | 40 |