I have a dataframe that has 5 columns. I want to remove duplicates based on "OPP_ID" column but want to merge the records for the last two columns "Sales" and "Marketing". The last two columns have NAs as well. I've tried several approaches but I have not gotten the desired effect.
Here is the initial Table
| Name | Company | Opp_id | Sales | Marketing
| John S. | Amazon | 12354 | Yes | NA
| Bill W. | Google | 15566 | NA | Yes
| Darryl W. | Facebook | 98456 | NA | Yes
| Darryl W. | Facebook | 98456 | Yes | NA
| Tom S. | Zillow | 87423 | NA | Yes
| Tom S. | Zillow | 87423 | Yes | NA
| Tom S. | Zillow | 87423 | Yes | NA
Here is the desired result table:
| Name | Company | Opp_ID | Sales | Marketing
| John S. | Amazon | 12354 | Yes | NA
| Bill W. | Google | 15566 | NA | Yes
| Darryl W. | Facebook | 98456 | Yes | Yes
| Tom S. | Zillow | 87423 | Yes | NA