Issue46882
State: closed

- [ ] closes #46882 
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
Hello @Mehgarg! 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/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/frame.py):

> [Line 355:1](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/frame.py#L355): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 8599:71](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/frame.py#L8599): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 10101:27](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/frame.py#L10101): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 10101:29](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/frame.py#L10101): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals

* In the file [`pandas/core/reshape/merge.py`](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py):

> [Line 654:1](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py#L654): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 1463:1](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py#L1463): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 1465:53](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py#L1465): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1465:55](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py#L1465): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1466:9](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py#L1466): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 1467:1](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py#L1467): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 1468:27](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py#L1468): [E711](https://duckduckgo.com/?q=pep8%20E711) comparison to None should be 'if cond is not None:'
> [Line 1483:1](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/core/reshape/merge.py#L1483): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace

* In the file [`pandas/tests/reshape/merge/test_merge.py`](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py):

> [Line 1415:1](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1415): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 1417:68](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1417): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1417:89](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1417): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (95 > 88 characters)
> [Line 1418:81](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1418): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1418:83](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1418): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1418:89](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1418): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (95 > 88 characters)
> [Line 1418:91](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1418): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1426:1](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1426): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 1427:9](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1427): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 1427:35](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1427): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 1430:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1430): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1430:20](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1430): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1430:22](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1430): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1430:24](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1430): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1430:26](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1430): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1431:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1431): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1432:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1432): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1435:39](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1435): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1435:41](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1435): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1435:61](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1435): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1435:63](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1435): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1437:1](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1437): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 1438:9](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1438): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 1441:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1441): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1441:20](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1441): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1441:22](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1441): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1441:24](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1441): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1441:26](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1441): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1442:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1442): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1443:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1443): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1445:18](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1445): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1445:20](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1445): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1448:59](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1448): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1448:61](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1448): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1453:9](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1453): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 1456:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1456): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1456:20](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1456): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1456:22](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1456): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1456:24](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1456): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1456:26](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1456): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1457:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1457): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1458:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1458): [E122](https://duckduckgo.com/?q=pep8%20E122) continuation line missing indentation or outdented
> [Line 1460:18](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1460): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1460:20](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1460): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1460:23](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1460): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1460:25](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1460): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1460:27](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1460): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1460:29](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1460): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 1462:59](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1462): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1462:61](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1462): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1467:9](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1467): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 1468:83](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1468): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1468:85](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1468): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1468:89](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1468): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (92 > 88 characters)
> [Line 1472:13](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1472): [E123](https://duckduckgo.com/?q=pep8%20E123) closing bracket does not match indentation of opening bracket's line
> [Line 1475:87](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1475): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1475:89](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1475): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 1475:89](https://github.com/pandas-dev/pandas/blob/7a1dce31302588b461d43c6cdba2082eb57c0c0e/pandas/tests/reshape/merge/test_merge.py#L1475): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (96 > 88 characters)


What would be blocking this? The original issue was marked at Contributions Welcome so I assumed the parameter was supported.
@attack68 was -1 on this and I would also lean to not support this
-1 as well

.join already does this not worth yet another kwarg in .merge

ok for a doc example of how to do
Thanks for the pull request @Mehgarg and sorry for the false impression that this feature was ready for a pull request, but generally it appears that the core team is not in favor of supporting this yet so closing. We're happy to have your contributions on other issues (generally ones where a team member has said a pull request is welcome in the comments).