I have two dataframes, the first one looks like:
| Age | 200 | 300 | 400 |
|---|---|---|---|
| 1 | 34 | 32 | 50 |
| 2 | 42 | 73 | 20 |
The second dataframe looks like
| ID | Age | Score |
|---|---|---|
| 10 | 2 | 200 |
| 23 | 1 | 300 |
My goal is to create another column in the second dataframe which fetches the value from the first dataframe by the corresponding values of both the column Age and Score. The Score's are the columns in the first dataframe.
The resulting dataframe:
| ID | Age | Score | Count |
|---|---|---|---|
| 10 | 2 | 200 | 42 |
| 23 | 1 | 300 | 32 |