I want to iterate each row of df2['name]' if the coin name is also found in df1 I want to create a new row in df2 with the tag names of df1. Alternatively create a new Df3 which ever the easiest.
I have tried many solution such as iterating but I had no luck
for row in df2['name']:
for row2 in df1['name']:
if row == row2:
...cannot complete this step...
My main issue it is that I don't know what is the best methodology to approach this. Iterations or not? I am sure that pandas has a better method but I cannot work it out.
I have a pandas dataframe that looks like that
df1
name | tags | |
---|---|---|
1 | bitcoin | mineable |
2 | ethereum | pow |
and a second one like this
df2
name | value | |
---|---|---|
1 | bitcoin | 0 |
2 | ethereum | 0.242424 |
Df3 the one I want to create
name | value | tags | |
---|---|---|---|
1 | bitcoin | 0 | mineable |
2 | ethereum | 0.242424 | pow |