TST/CLN: empty DataFrames and some 'empty' Series
State: closed

xref https://github.com/pandas-dev/pandas/pull/24886#issuecomment-468984081

have included Series constructed with an empty dict.

Series constructed with an empty list, tuple or generator are not the same as Series() or Series({}), so have not included them in this pass. (although for many tests the difference in the Index is not relevant) 


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Clean

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

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

```diff
@@            Coverage Diff             @@
##           master   #25690      +/-   ##
==========================================
+ Coverage   91.28%   91.28%   +<.01%     
==========================================
  Files         173      173              
  Lines       52965    52965              
==========================================
+ Hits        48348    48349       +1     
+ Misses       4617     4616       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.86% <ø> (ø)` | :arrow_up: |
| #single | `41.73% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25690?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25690/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `89.08% <0%> (+0.09%)` | :arrow_up: |

------

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

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25690?src=pr&el=h1) Report
> Merging [#25690](https://codecov.io/gh/pandas-dev/pandas/pull/25690?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/26d991fc4e568432c3264151265c0a3ea9a6f133?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #25690      +/-   ##
==========================================
+ Coverage   91.28%   91.28%   +<.01%     
==========================================
  Files         173      173              
  Lines       52965    52965              
==========================================
+ Hits        48348    48349       +1     
+ Misses       4617     4616       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.86% <ø> (ø)` | :arrow_up: |
| #single | `41.73% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25690?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25690/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `89.08% <0%> (+0.09%)` | :arrow_up: |

------

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

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25690?src=pr&el=h1) Report
> Merging [#25690](https://codecov.io/gh/pandas-dev/pandas/pull/25690?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/95c78d650a420eb3282d5862a088b00617e09588?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #25690      +/-   ##
==========================================
+ Coverage   91.47%   91.48%   +<.01%     
==========================================
  Files         175      175              
  Lines       52885    52885              
==========================================
+ Hits        48379    48380       +1     
+ Misses       4506     4505       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.04% <ø> (ø)` | :arrow_up: |
| #single | `41.82% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25690?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25690/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `89.84% <0%> (+0.1%)` | :arrow_up: |

------

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

this is fine. is it possible to have a code_checks rule to detect these (slightly tricky as you only want to disallow these in an assignment (and not a lambda).
can you update
> this is fine. is it possible to have a code_checks rule to detect these (slightly tricky as you only want to disallow these in an assignment (and not a lambda).

have not looked into this yet, will circle back round after revisiting my other open PRs.
thanks @simonjayhawkins 

yeah if you can think of a nice way to add to code_checks would be great.