BUG: Ignore division by 0 when merging empty dataframes (#17776)
- [x] closes #17776
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
