DOC: Make section title capitalization consistent #26830
State: closed

- [X] closes #26830

This superseeds #26933, and should contain all the fixes requested there.


Labels:
name: Docs

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26950?src=pr&el=h1) Report
> Merging [#26950](https://codecov.io/gh/pandas-dev/pandas/pull/26950?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/d47947a79099d650b4bb981a38ce09881ec6f43d?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/26950/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/26950?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #26950      +/-   ##
==========================================
- Coverage   91.87%   91.86%   -0.01%     
==========================================
  Files         180      180              
  Lines       50743    50743              
==========================================
- Hits        46620    46617       -3     
- Misses       4123     4126       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.46% <ø> (ø)` | :arrow_up: |
| #single | `41.12% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26950?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/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/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.89% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.94% <0%> (+0.1%)` | :arrow_up: |

------

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

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

```diff
@@             Coverage Diff             @@
##           master   #26950       +/-   ##
===========================================
- Coverage   92.04%   41.14%   -50.91%     
===========================================
  Files         180      180               
  Lines       50714    50682       -32     
===========================================
- Hits        46679    20852    -25827     
- Misses       4035    29830    +25795
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `?` | |
| #single | `41.14% <46.47%> (-0.82%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26950?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/json/normalize.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2pzb24vbm9ybWFsaXplLnB5) | `8.16% <ø> (-88.78%)` | :arrow_down: |
| [pandas/core/arrays/integer.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2ludGVnZXIucHk=) | `43.28% <ø> (-53.03%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `45.46% <ø> (-50.91%)` | :arrow_down: |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `34.16% <ø> (-61.58%)` | :arrow_down: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `86.61% <ø> (-9.2%)` | :arrow_down: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `53.64% <ø> (-39.66%)` | :arrow_down: |
| [pandas/core/reshape/tile.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS90aWxlLnB5) | `11.04% <ø> (-86.63%)` | :arrow_down: |
| [pandas/core/sparse/scipy\_sparse.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL3NjaXB5X3NwYXJzZS5weQ==) | `10.14% <ø> (-89.86%)` | :arrow_down: |
| [pandas/core/groupby/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9nZW5lcmljLnB5) | `14.82% <ø> (-74.52%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `38.45% <ø> (-55.75%)` | :arrow_down: |
| ... and [195 more](https://codecov.io/gh/pandas-dev/pandas/pull/26950/diff?src=pr&el=tree-more) | |

------

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

@jorisvandenbossche merge when you're happy (and when you have time to review, will take a bit ;) )
That makes sense, I was really confused by those changes to MultiIndex.  I
have ran the specified commands and will apply the suggested changes.

On Fri, Jun 21, 2019 at 12:00 AM Joris Van den Bossche <
notifications@github.com> wrote:

> *@jorisvandenbossche* commented on this pull request.
> ------------------------------
>
> In doc/source/development/contributing_docstring.rst
> <https://github.com/pandas-dev/pandas/pull/26950#discussion_r295818438>:
>
> > @@ -505,7 +505,7 @@ If the method yields its value:
>
>
>
>  .. _docstring.see_also:
>
>
>
> -Section 5: See Also
>
> +Section 5: See also
>
>
> The section is called "See Also" with strict capitalisation, so you can
> leave that here as well
> ------------------------------
>
> In doc/source/user_guide/advanced.rst
> <https://github.com/pandas-dev/pandas/pull/26950#discussion_r296109211>:
>
> >  ~~~~~~~~~~~~~~
>
>
>
> -The :class:`MultiIndex` keeps all the defined levels of an index, even
>
> +The repr of a ``MultiIndex`` shows all the defined levels of an index, even
>
>
> I don't think this is a fully correct change. It is indeed shown in the
> repr, but here I think it was emphasized that the actual object keeps those.
> ------------------------------
>
> In doc/source/user_guide/advanced.rst
> <https://github.com/pandas-dev/pandas/pull/26950#discussion_r296109413>:
>
> >  if they are not actually used. When slicing an index, you may notice this.
>
>  For example:
>
>
>
>  .. ipython:: python
>
>
>
> -   df.columns.levels  # original MultiIndex
>
> +   df.columns  # original MultiIndex
>
>
> Can you revert this?
> I would keep it here strictly on capitalisation changes, that makes it
> easier to review.
>
> I think the above is also not a correct change, as we just changed the
> repr of a MI, and it will no longer show all levels, so you really need to
> look at the .levels attribute
> ------------------------------
>
> In doc/source/user_guide/advanced.rst
> <https://github.com/pandas-dev/pandas/pull/26950#discussion_r296109923>:
>
> > @@ -210,8 +210,7 @@ To reconstruct the ``MultiIndex`` with only the used levels, the
>
>
>
>  .. ipython:: python
>
>
>
> -   new_mi = df[['foo', 'qux']].columns.remove_unused_levels()
>
> -   new_mi.levels
>
>
> also revert this one
> ------------------------------
>
> In doc/source/user_guide/cookbook.rst
> <https://github.com/pandas-dev/pandas/pull/26950#discussion_r296110186>:
>
> > @@ -706,7 +706,7 @@ Apply
>
>                          for ind, row in df.iterrows()})
>
>     df_orgz
>
>
>
> -`Rolling Apply with a DataFrame returning a Series
>
> +`Rolling apply with a DataFrame returning a series
>
>
> ⬇️ Suggested change
>
> -`Rolling apply with a DataFrame returning a series
>
> +`Rolling apply with a DataFrame returning a Series
>
>
> ------------------------------
>
> In doc/source/user_guide/options.rst
> <https://github.com/pandas-dev/pandas/pull/26950#discussion_r296112710>:
>
> >  -----------------------------------------------------
>
>
>
> -Using startup scripts for the python/ipython environment to import pandas and set options makes working with pandas more efficient.  To do this, create a .py or .ipy script in the startup directory of the desired profile.  An example where the startup folder is in a default ipython profile can be found at:
>
> +Using startup scripts for the Python/Ipython environment to import pandas and set options makes working with pandas more efficient.  To do this, create a .py or .ipy script in the startup directory of the desired profile.  An example where the startup folder is in a default ipython profile can be found at:
>
>
> ⬇️ Suggested change
>
> -Using startup scripts for the Python/Ipython environment to import pandas and set options makes working with pandas more efficient.  To do this, create a .py or .ipy script in the startup directory of the desired profile.  An example where the startup folder is in a default ipython profile can be found at:
>
> +Using startup scripts for the Python/IPython environment to import pandas and set options makes working with pandas more efficient.  To do this, create a .py or .ipy script in the startup directory of the desired profile.  An example where the startup folder is in a default ipython profile can be found at:
>
>
> ------------------------------
>
> In doc/source/whatsnew/v0.10.0.rst
> <https://github.com/pandas-dev/pandas/pull/26950#discussion_r296115461>:
>
> > @@ -490,7 +490,7 @@ Updated PyTables Support
>
>  however, query terms using the prior (undocumented) methodology are unsupported. You must read in the entire
>
>  file and write it out using the new format to take advantage of the updates.
>
>
>
> -N Dimensional Panels (Experimental)
>
> +N dimensional panels (experimental)
>
>
> ⬇️ Suggested change
>
> -N dimensional panels (experimental)
>
> +N dimensional Panels (experimental)
>
>
> ------------------------------
>
> In doc/source/whatsnew/v0.25.0.rst
> <https://github.com/pandas-dev/pandas/pull/26950#discussion_r296117557>:
>
> > @@ -74,41 +74,9 @@ a dict to a Series groupby aggregation (:ref:`whatsnew_0200.api_breaking.depreca
>
>
>
>  See :ref:`groupby.aggregate.named` for more.
>
>
>
> -
>
> -.. _whatsnew_0250.enhancements.multi_index_repr:
>
> -
>
>
> Ah, this is probably something that went wrong with updating with latest
> master, as this was a recent PR that was merged.
> My previous comments about things you changed in the MultiIndex text is
> probably caused by that as well.
>
> I would do:
>
> git fetch upstream
>
> git merge upstream/master
>
>
> in this branch.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/26950?email_source=notifications&email_token=AFA5BYKSVXYZZEXCVLTCMD3P3R4CTA5CNFSM4HZLYI6KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB4E6KUQ#pullrequestreview-252306770>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AFA5BYLF752RVPVBBMOPIB3P3R4CTANCNFSM4HZLYI6A>
> .
>

@pmaxey83 it seems that again something went wrong with merging master, as there a couple of changes in here from recent other PRs. Not fully sure how that happened or so what to recommend doing. One option might be to start from a clean branch from master, and only cherry-pick the commits from this branch with actual doc changes.
Hello @pmaxey83! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:











































* In the file [`pandas/tests/io/test_pytables.py`](https://github.com/pandas-dev/pandas/blob/d96c8c50589afb89cd4a4a8d1db8876b3a189499/pandas/tests/io/test_pytables.py):

> [Line 3288:13](https://github.com/pandas-dev/pandas/blob/d96c8c50589afb89cd4a4a8d1db8876b3a189499/pandas/tests/io/test_pytables.py#L3288): [E741](https://duckduckgo.com/?q=pep8%20E741) ambiguous variable name 'l'
















@pmaxey83 Thanks a lot!