ENH: validates boolean kwargs in DataFrame and Series methods
State: closed

- [X] closes #16714 (for DataFrame and Series)
- [X] [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
- [X] pre commit code check passed
- [X] Added an entry in the latest whatsnew.

(First commit is an extra frame.py and the second is deleting it- all frame.py's are in the right place)


Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions
name: Stale

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

> [Line 1386:5](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/core/frame.py#L1386): [E301](https://duckduckgo.com/?q=pep8%20E301) expected 1 blank line, found 0
> [Line 2019:89](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/core/frame.py#L2019): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (89 > 88 characters)
> [Line 2922:89](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/core/frame.py#L2922): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (114 > 88 characters)
> [Line 9720:89](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/core/frame.py#L9720): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (97 > 88 characters)

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

> [Line 5456:89](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/core/series.py#L5456): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (132 > 88 characters)

* In the file [`pandas/tests/frame/test_validate.py`](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/tests/frame/test_validate.py):

> [Line 43:1](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/tests/frame/test_validate.py#L43): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 43:89](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/tests/frame/test_validate.py#L43): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (523 > 88 characters)
> [Line 48:43](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/tests/frame/test_validate.py#L48): [W292](https://duckduckgo.com/?q=pep8%20W292) no newline at end of file

* In the file [`pandas/tests/series/test_validate.py`](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/tests/series/test_validate.py):

> [Line 28:1](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/tests/series/test_validate.py#L28): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 28:89](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/tests/series/test_validate.py#L28): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (418 > 88 characters)
> [Line 33:47](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/tests/series/test_validate.py#L33): [W292](https://duckduckgo.com/?q=pep8%20W292) no newline at end of file

* In the file [`pandas/util/_validators.py`](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/util/_validators.py):

> [Line 524:1](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/util/_validators.py#L524): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 551:5](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/util/_validators.py#L551): [E306](https://duckduckgo.com/?q=pep8%20E306) expected 1 blank line before a nested definition, found 0
> [Line 558:52](https://github.com/pandas-dev/pandas/blob/3cab1f28c3ab31eba819dafd8bb29d58c177a6f1/pandas/util/_validators.py#L558): [W292](https://duckduckgo.com/?q=pep8%20W292) no newline at end of file


This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.