When a DataFrame is merged with an empty dataframe, it was creating an incorrect index for the resulting dataframe. Fix for it 
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


In the current fix, if any dataframe is empty, a index is set explicitly using the set_index function
Hello @ananya197! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/core/frame.py`](https://github.com/pandas-dev/pandas/blob/d1165d0524048d1f580016969325e9026d3a4082/pandas/core/frame.py):

> [Line 7205:21](https://github.com/pandas-dev/pandas/blob/d1165d0524048d1f580016969325e9026d3a4082/pandas/core/frame.py#L7205): [E126](https://duckduckgo.com/?q=pep8%20E126) continuation line over-indented for hanging indent
> [Line 7213:21](https://github.com/pandas-dev/pandas/blob/d1165d0524048d1f580016969325e9026d3a4082/pandas/core/frame.py#L7213): [E123](https://duckduckgo.com/?q=pep8%20E123) closing bracket does not match indentation of opening bracket's line
> [Line 7214:89](https://github.com/pandas-dev/pandas/blob/d1165d0524048d1f580016969325e9026d3a4082/pandas/core/frame.py#L7214): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (92 > 88 characters)

 Is this closing an issue? If not, can you show an example? Hi @ananya197 ! It's not very clear what this is for so closing for now. If you can point to an issue or provide some context on the purpose though we can certainly reopen as required