Frame ops prelims - de-duplicate, remove unused kwargs
State: closed

Starting in on making DataFrame ops consistent with Series and Index ops.  As a first pass, this goes through and removes some duplicate code and unused arguments.

Changes logic in exactly two corner cases:  arithmetic operations `frame.op(series, axis=None, fill_value=not_none)` where one of `series` or `frame` has length zero.  `axis` needs to be specifically passed as `None` to hit the changed case.

```
ser = pd.Series([])
df = pd.DataFrame([[1, 2], [3, 4]])

>>> df.add(ser, axis=None, fill_value='E')
>>> ser.to_frame().sub(df[0], axis=None, fill_value=3)
```

will now raise instead of returning
```
>>> df.add(ser, axis=None, fill_value='E')
    0   1
0 NaN NaN
1 NaN NaN

>>> ser.to_frame().sub(df[0], axis=None, fill_value=3)
Empty DataFrame
Columns: [0]
Index: []
```



Labels:
name: Internals
description: Related to non-user accessible pandas implementation
name: Clean

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19522?src=pr&el=h1) Report
> Merging [#19522](https://codecov.io/gh/pandas-dev/pandas/pull/19522?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ed10bf618b93726c61ed9b3ebbc3031416bc1263?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `90.9%`.

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

```diff
@@            Coverage Diff             @@
##           master   #19522      +/-   ##
==========================================
- Coverage    91.6%    91.6%   -0.01%     
==========================================
  Files         150      150              
  Lines       48750    48736      -14     
==========================================
- Hits        44657    44644      -13     
+ Misses       4093     4092       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.97% <90.9%> (-0.01%)` | :arrow_down: |
| #single | `41.74% <50%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19522?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/19522/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `94.83% <100%> (-0.02%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/19522/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.43% <100%> (-0.02%)` | :arrow_down: |
| [pandas/core/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/19522/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvb3BzLnB5) | `95.22% <100%> (ø)` | :arrow_up: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/19522/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.42% <80%> (-0.01%)` | :arrow_down: |
| [pandas/core/reshape/merge.py](https://codecov.io/gh/pandas-dev/pandas/pull/19522/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9tZXJnZS5weQ==) | `94.22% <0%> (ø)` | :arrow_up: |
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/19522/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.56% <0%> (+0.06%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19522?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/19522?src=pr&el=footer). Last update [ed10bf6...85d501c](https://codecov.io/gh/pandas-dev/pandas/pull/19522?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

so you need some tests to validate your claims at the top of the PR

> Changes logic in exactly two corner cases: arithmetic operations frame.op(series, axis=None, 

and a release note.

thanks