I have a dataframe 'df' that looks like this:
| LatName | ComName |
|---|---|
| Todd Smith | Becky Jones |
| Becky Jones | |
| Becky Jones | |
| Rachel Adams |
And another dataframe 'df2' that looks like this:
| LatinName | CommonName |
|---|---|
| Brad Robbins | Becky Jones |
| Steve Reisen | Rachel Adams |
| Connor McDougal | Charlie Williams |
If want to match values in ComName and CommonName and if they match fill in LatName with LatinName only if LatName is empty to begin with. If LatName isn't empty, then I want that entry left alone, so that the end result of df looks like this:
| LatName | ComName |
|---|---|
| Todd Smith | Becky Jones |
| Brad Robbins | Becky Jones |
| Brad Robbins | Becky Jones |
| Steve Reisen | Rachel Adams |
I left the blank row in there on purpose because some of my rows have nothing in them.
Thank you!