ENH: Add empty property to Index.
State: closed

Previously, attempting to evaluate an Index in a boolean context prints
an error message listing various alternatives, one of which is `.empty`,
which was not actually implemented on `Index`.

 - [x] closes #13207
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master | flake8 --diff``
 - [x] whatsnew entry


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

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


```diff
@@            Coverage Diff             @@
##           master   #15270      +/-   ##
==========================================
- Coverage   90.37%   90.37%   -0.01%     
==========================================
  Files         135      135              
  Lines       49466    49468       +2     
==========================================
+ Hits        44705    44706       +1     
- Misses       4761     4762       +1
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15270?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bb0126f2748825d3c9cf315c8ea1482cb8cbaefa?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `95.17% <100%> (+0.02%)` | :white_check_mark: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bb0126f2748825d3c9cf315c8ea1482cb8cbaefa?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.02% <ø> (-0.34%)` | :x: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15270?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/15270?src=pr&el=footer). Last update [12f2c6a...bb0126f](https://codecov.io/gh/pandas-dev/pandas/compare/12f2c6a101cf866527df5dac4184a8803792fd78...bb0126f2748825d3c9cf315c8ea1482cb8cbaefa?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Happy to open a separate issue for this to close if it's desired.  Whatsnew entry is currently just pointing at this PR.
PR number is fine

though pls search for an open issue (might be one)
Looks like this was actually already reported as https://github.com/pandas-dev/pandas/issues/13207 and claims to be fixed in https://github.com/pandas-dev/pandas/pull/13216, though that branch looks like it's had some rebasing troubles and no longer appears to have the change related to `.empty`.
Whatsnew added and comment added in the tests.
The other PR was linked to the wrong issue. It was indeed fixing something else (corrected that now)
@ssanderson trivial change. pls ping when green.
@jreback updated to just use `.size`.
while you are at it, can you add ``.empty`` in ``doc/source/api.rst`` (for Index, Series, DataFrame, Panel...etc)
can you rebase / update ....so close!
can you update
thanks!