DOC: Fixing even more warnings (not many left)
State: closed

- [X] xref #24173
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Let's wait for the logs, tested locally only part of them, but this should fix most of the remaining warnings.

CC: @jorisvandenbossche 

Labels:
name: Docs

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

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

```diff
@@            Coverage Diff             @@
##           master   #26850      +/-   ##
==========================================
- Coverage   91.86%   91.85%   -0.01%     
==========================================
  Files         179      179              
  Lines       50700    50700              
==========================================
- Hits        46576    46572       -4     
- Misses       4124     4128       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.45% <ø> (ø)` | :arrow_up: |
| #single | `41.09% <ø> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26850?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.71% <ø> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `88.88% <0%> (-11.12%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.88% <0%> (-0.12%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26850?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/26850?src=pr&el=footer). Last update [8374a1d...c396d44](https://codecov.io/gh/pandas-dev/pandas/pull/26850?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/26850?src=pr&el=h1) Report
> Merging [#26850](https://codecov.io/gh/pandas-dev/pandas/pull/26850?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8374a1d2a58245067669cd6424793b134a695971?src=pr&el=desc) will **decrease** coverage by `50.78%`.
> The diff coverage is `50%`.

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

```diff
@@             Coverage Diff             @@
##           master   #26850       +/-   ##
===========================================
- Coverage   91.86%   41.08%   -50.79%     
===========================================
  Files         179      179               
  Lines       50700    50717       +17     
===========================================
- Hits        46576    20835    -25741     
- Misses       4124    29882    +25758
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `?` | |
| #single | `41.08% <50%> (-0.11%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26850?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `55.68% <50%> (-41.04%)` | :arrow_down: |
| [pandas/io/formats/latex.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvbGF0ZXgucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/plotting/\_matplotlib/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19tYXRwbG90bGliL19faW5pdF9fLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/gcs.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2djcy5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/sas/sas\_constants.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXNfY29uc3RhbnRzLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/core/groupby/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9jYXRlZ29yaWNhbC5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/tseries/plotting.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvcGxvdHRpbmcucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/s3.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3MzLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/formats/html.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvaHRtbC5weQ==) | `0% <0%> (-99.37%)` | :arrow_down: |
| [pandas/io/sas/sas7bdat.py](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXM3YmRhdC5weQ==) | `0% <0%> (-91.16%)` | :arrow_down: |
| ... and [133 more](https://codecov.io/gh/pandas-dev/pandas/pull/26850/diff?src=pr&el=tree-more) | |

------

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

Almost! ;)

There are two left (from the ones we could solve):

/home/travis/build/pandas-dev/pandas/doc/source/reference/api/pandas.Index.asi8.rst: WARNING: document isn't included in any toctree
/home/travis/build/pandas-dev/pandas/doc/source/reference/api/pandas.api.extensions.ExtensionDtype.na_value.rst: WARNING: document isn't included in any toctree

About the ExtensionDtype.na_value: It doesn't seem generated in the actual class docstring page (http://dev.pandas.io/reference/api/pandas.api.extensions.ExtensionDtype.html#pandas.api.extensions.ExtensionDtype), so I think we can remove the comment at the bottom of https://raw.githubusercontent.com/pandas-dev/pandas/master/doc/source/reference/index.rst to avoid the warning

Didn't see where `Index.asi8` is implemented, just saw the methods for subclasses of it. Let the trickier ones for the end, I'm having a look at the contributor errors, I'll open a PR to add the error returned by git to the warning.

Feel free to look at those if you want, and also:
```
/home/travis/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/IPython/core/interactiveshell.py:925: UserWarning: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
```

I think we should be able to start failing on warnings today, before more are introduced. :)
I made the change locally, will push here
I just saw that the virtualenv error doesn't happen in azure, there are just 3 warnings left there according to sphinx. Better don't bother then, it's in azure where we need to add the validation.
Do you already know how you would do the validation? Can we capture and parse the log build in azure?
sphinx has parameters for that:
```
  -W                turn warnings into errors
  --keep-going      With -W, Keep going when getting warnings
```
I think we had some discussion about that before, but some problems with that: a) it doesn't handle the ipython directive errors (I think?) and b) it doesn't allow us to have some exceptions (eg to ignore our contributor directive that needs the full git history)
Refeshing my memory: we had a discussion about this in https://github.com/pandas-dev/pandas/pull/22743. You added a `--warnings-are-errors` to our doc build script to basically have this `-W --keep-going` (https://github.com/pandas-dev/pandas/pull/24523). 
Ah, and https://github.com/pandas-dev/pandas/issues/24661 is the proper issue to further discuss this.
Hmm, my commit didn't work, reverting.
I actually read the warning wrong: it says those two attributes are not included in any toctree, while they actually are (that's what I first tried to remove). Not sure then ..
Let's already merge those.