Let's say I have these two dataframes:
| worker_name | worker_age |
|---|---|
| Alex | 35 |
| John | 65 |
| Karl | 26 |
| worker_name | duties | title |
|---|---|---|
| Simon | Plumber | Walmart |
| Alex | Analyst | Amazon |
| John | Driver | Uber |
How can I get such a dataframe?
| worker_name | worker_age | duties | title |
|---|---|---|---|
| Alex | 35 | Analyst | Amazon |
| John | 65 | Driver | Uber |
| Karl | 26 | Nan | Nan |
I tried going through iteration with df.iterrows() but it takes too much time so it's not the option for my data.