I have two DataFrames:
name | age | weight | sex | d_type |
---|---|---|---|---|
john | 21 | 56 | M | futboll |
martha | 25 | 43 | F | soccer |
esthela | 29 | 53 | F | judo |
harry | 18 | 72 | M | karate |
irving | 24 | 61 | M | karate |
jerry | 21 | 56 | M | soccer |
john_2 | 26 | 69 | M | futboll |
malina | 22 | 53 | F | soccer |
And
d_type | impact | founds_in |
---|---|---|
futboll | high | federal |
soccer | medium | state |
judo | medium | federal |
karate | high | federal |
At the end I want a DF like this.
name | age | weight | sex | d_type | impact | founds_in |
---|---|---|---|---|---|---|
john | 21 | 56 | M | futboll | high | federal |
martha | 25 | 43 | F | soccer | medium | state |
esthela | 29 | 53 | F | judo | medium | federal |
harry | 18 | 72 | M | karate | high | federal |
irving | 24 | 61 | M | karate | high | federal |
jerry | 21 | 56 | M | soccer | medium | state |
john_2 | 26 | 69 | M | futboll | high | federal |
malina | 22 | 53 | F | soccer | medium | state |
How can I do this in pandas? I need a loop or it's better try in Linux?