is the merge function the appropriate way to join the Dataframes 1 and 2 to get the Desired Dataframe?
Dataframe 1:
| animal | category | Add-Date |
|---|---|---|
| wolf | land | 24/09/22 |
| eagle | sky | 24/09/22 |
| robin | sky | 24/09/22 |
| bear | land | 24/09/22 |
| cod | water | 24/09/22 |
| salmon | water | 24/09/22 |
Dataframe 2:
| category | Tier |
|---|---|
| land | 1 |
| sky | 2 |
Desired Dataframe:
| animal | category | Add-Date | Tier |
|---|---|---|---|
| wolf | land | 24/09/22 | 1 |
| eagle | sky | 24/09/22 | 2 |
| robin | sky | 24/09/22 | 2 |
| bear | land | 24/09/22 | 1 |
The Desired Dataframe is Dataframe 1 with irrelevant categories removed and the appropriate Tier brought across with the category.
I was trying merge, join, etc. but unsure of the best approach or if I am making an error. Any help much appreciated on the code or method to use.
