CLN:Remove unused **kwargs from user facing methods
State: closed

closes GH18748 for user facing methods.

An updated [extra_kwargs.txt](https://github.com/pandas-dev/pandas/files/2498300/extra_kwargs.txt) mostly shows internal functions and false positives. 

There are a few cases like all of the `visit_*` functions that removing the `**kwargs` breaks the API. 

- [ ] xref #18748 
- [x ] tests added / passed
- [x ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry - N/A only code cleanup. 


Labels:
name: Clean

Comments:
Hello @kprestel! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/io/pytables.py`](https://github.com/kprestel/pandas/blob/0a785d5a388ee9128b3e4996f66393dca47a5e9a/pandas/io/pytables.py) !



##### Comment last updated on November 11, 2018 at 16:41 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23249?src=pr&el=h1) Report
> Merging [#23249](https://codecov.io/gh/pandas-dev/pandas/pull/23249?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/58a59bd606911f11a4f679df18a00cfc25536c30?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23249/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23249?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #23249   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files         161      161           
  Lines       51288    51288           
=======================================
  Hits        47304    47304           
  Misses       3984     3984
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.62% <100%> (ø)` | :arrow_up: |
| #single | `42.26% <100%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23249?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/23249/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `92.34% <100%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23249?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23249?src=pr&el=footer). Last update [58a59bd...0a785d5](https://codecov.io/gh/pandas-dev/pandas/pull/23249?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Quick glance at the CI failures seem related to the change. If you could take a look would be great, ping if you need help
@WillAyd I think I fixed the tests (they all pass locally) but the change I had to make seems a bit counter to the essence of this issue. 

It seems that the failures were mostly related to passing the kwarg `errors` added in regards to issue #20835, but naively I seems that it doesn't actually do anything. It just seems like its forcing `**kwargs` to be passed around to several functions but it only contains `errors` which from what I can tell doesn't do anything. 

Its likely that I just don't know what I'm talking about and this is needed for something that I just don't know about, but I wanted to at least bring it up so someone with more knowledge of the code base can look a bit closer at it. 

Thanks again for the review and the help!
Hmm OK. I personally wouldn't be opposed to making `errors` a named argument if it helps with the code readability - how many functions are we talking about?
@WillAyd It wasn't a ton of functions. Maybe 3-4? 
I'm not against using an explicit named parameter instead of kwargs for the `errors`. That would also somewhat progress towards #20903 so if it is simple and helps code readability I say go for that
does this competely close #18748 ?
can you merge master and update
@jreback Addressed your request for changes and yes this completely closes #18748. There are some internal functions as well as test functions that still have this issue but as you said in the issue, those aren't really an issue. I have run the script from the issue and the results are posted in this PR. 

@WillAyd I don't actually think passing `numeric_only` warrants a separate issue. It seems to actually make it more consistent with the other functions in the module. `cumprod` and `cumsum` for example, already pass the `**kwargs` to the `self._cython_transform` function. 

I can add a test if you want but I do believe that it is in the same of this issue I'm addressing so it belongs in this PR. I'm happy to change it (or add a whatsnew + tests) if you want but I don't think its necessarily warranted. 
@jreback I reverted that `numeric_only` change. I will open up a new issue and PR for that. 

Thanks for the help.
Thanks @kprestel !