how do I change a value of a dataframe, based on another dataframe with different column names? I have Table 1 and Table 2, and would like to produce the Desired outcome as stated below.
I would like to change Number column of table 1, if Index of table 1 exists in Alphabet of Table2, without the use of if else as my dataframe is large.
Table 1)
| Index | Number |
|---|---|
| A | 1 |
| B | 2 |
| C | 3 |
| D | 4 |
Table 2)
| Alphabet | Integer |
|---|---|
| B | 25 |
| C | 30 |
Desired Output:
| Index | Number |
|---|---|
| A | 1 |
| B | 25 |
| C | 30 |
| D | 4 |