index fixed when join with empty dataframe
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

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/2925cae048815f03932109f43efbfbc6904b4824/pandas/core/frame.py):

> [Line 4386:1](https://github.com/pandas-dev/pandas/blob/2925cae048815f03932109f43efbfbc6904b4824/pandas/core/frame.py#L4386): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 7212:21](https://github.com/pandas-dev/pandas/blob/2925cae048815f03932109f43efbfbc6904b4824/pandas/core/frame.py#L7212): [E123](https://duckduckgo.com/?q=pep8%20E123) closing bracket does not match indentation of opening bracket's line
> [Line 7213:17](https://github.com/pandas-dev/pandas/blob/2925cae048815f03932109f43efbfbc6904b4824/pandas/core/frame.py#L7213): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 7214:89](https://github.com/pandas-dev/pandas/blob/2925cae048815f03932109f43efbfbc6904b4824/pandas/core/frame.py#L7214): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (96 > 88 characters)
> [Line 7215:1](https://github.com/pandas-dev/pandas/blob/2925cae048815f03932109f43efbfbc6904b4824/pandas/core/frame.py#L7215): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace

