-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Make section title capitalization consistent #26830 #26950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, there is just one of the cases from the previous review that wasn't changed.
@@ -643,7 +643,7 @@ there for details about accepted inputs. | |||
|
|||
.. _basics.idxmin: | |||
|
|||
Index of Min/Max Values | |||
Index of min/max Values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
values in lowercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected that line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pmaxey83 great work here, will be nice to see the documentation rendered once this is merged (it'll be automatically published at dev.pandas.io)
Btw, for future contributions it'll be useful for you to use a separate branch for every PR you want to open. If you wanted to start working in something else now (until this is merged), you don't have an easy way, since you've got this in master
(where other branches are created from).
@jorisvandenbossche merge when you're happy (and when you have time to review, will take a bit ;) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of very small changes. ping on green.
doc/source/reference/series.rst
Outdated
@@ -119,7 +119,7 @@ Binary operator functions | |||
Series.product | |||
Series.dot | |||
|
|||
Function application, GroupBy & Window | |||
Function application, GroupBy & window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Groupby?
@@ -505,7 +505,7 @@ If the method yields its value: | |||
|
|||
.. _docstring.see_also: | |||
|
|||
Section 5: See Also | |||
Section 5: See also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section is called "See Also" with strict capitalisation, so you can leave that here as well
doc/source/user_guide/advanced.rst
Outdated
~~~~~~~~~~~~~~ | ||
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
doc/source/user_guide/advanced.rst
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
doc/source/user_guide/advanced.rst
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also revert this one
doc/source/user_guide/cookbook.rst
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`Rolling apply with a DataFrame returning a series | |
`Rolling apply with a DataFrame returning a Series |
doc/source/user_guide/options.rst
Outdated
----------------------------------------------------- | ||
|
||
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
doc/source/whatsnew/v0.10.0.rst
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N dimensional panels (experimental) | |
N dimensional Panels (experimental) |
doc/source/whatsnew/v0.25.0.rst
Outdated
@@ -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: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still missing
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 < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In doc/source/development/contributing_docstring.rst
<#26950 (comment)>:
> @@ -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
<#26950 (comment)>:
> ~~~~~~~~~~~~~~
-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
<#26950 (comment)>:
> 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
<#26950 (comment)>:
> @@ -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
<#26950 (comment)>:
> @@ -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
<#26950 (comment)>:
> -----------------------------------------------------
-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
<#26950 (comment)>:
> @@ -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
<#26950 (comment)>:
> @@ -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
<#26950?email_source=notifications&email_token=AFA5BYKSVXYZZEXCVLTCMD3P3R4CTA5CNFSM4HZLYI6KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB4E6KUQ#pullrequestreview-252306770>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFA5BYLF752RVPVBBMOPIB3P3R4CTANCNFSM4HZLYI6A>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pmaxey83, there are still few unrelated changes possibly from a merge. Can you fix those, and the couple of cases in the review comments, so we can get this merged. Thanks!
doc/source/user_guide/advanced.rst
Outdated
~~~~~~~~~~~~~~ | ||
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is from a merge, but we avoid having unrelated changes in PRs, in case something goes wrong and we need to revert. If this comes from a merge that applies it, please revert to the original. If it's you proposing to change those, that's welcome, but please open a separate PR for anything that is not about fixing the capitalization of titles.
doc/source/user_guide/advanced.rst
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
doc/source/user_guide/advanced.rst
Outdated
|
||
df[['foo','qux']].columns.levels # sliced | ||
df[['foo','qux']].columns # sliced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
doc/source/user_guide/advanced.rst
Outdated
@@ -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 | |||
df[['foo', 'qux']].columns.remove_unused_levels() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
doc/source/user_guide/cookbook.rst
Outdated
@@ -1099,7 +1099,7 @@ HDFStore | |||
|
|||
The :ref:`HDFStores <io.hdf5>` docs | |||
|
|||
`Simple Queries with a Timestamp Index | |||
`Simple queries with a timestamp index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timestamp and Index are class names, can you leave the capitalization of those please
doc/source/user_guide/groupby.rst
Outdated
@@ -321,7 +321,7 @@ Index level names may be supplied as keys. | |||
|
|||
More on the ``sum`` function and aggregation later. | |||
|
|||
Grouping DataFrame with Index Levels and Columns | |||
Grouping DataFrame with index levels and columns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you leave Index
with uppercase
doc/source/user_guide/options.rst
Outdated
@@ -120,10 +120,10 @@ are restored automatically when you exit the `with` block: | |||
print(pd.get_option("display.max_columns")) | |||
|
|||
|
|||
Setting Startup Options in python/ipython Environment | |||
Setting startup options in Python/Ipython environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IPython
with capital P too
doc/source/whatsnew/v0.21.0.rst
Outdated
@@ -507,7 +507,7 @@ The configuration option ``pd.options.mode.use_inf_as_null`` is deprecated, and | |||
|
|||
.. _whatsnew_0210.api_breaking.iteration_scalars: | |||
|
|||
Iteration of Series/Index will now return Python scalars | |||
Iteration of series/index will now return Python scalars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Series/Index
with capital S and I
doc/source/whatsnew/v0.25.0.rst
Outdated
@@ -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: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still missing
@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 issues, and found:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmaxey83 I saw you were having trouble restoring this PR to a correct state without unrelated changes, so I fixed it for you. You can leave it with us, no need to push or change anything, should be ready to merge now.
@jreback @jorisvandenbossche can you have a last look and merge if everything looks good please?
@pmaxey83 Thanks a lot! |
This superseeds #26933, and should contain all the fixes requested there.