Skip to content

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

Merged
merged 9 commits into from
Jun 27, 2019
Merged

DOC: Make section title capitalization consistent #26830 #26950

merged 9 commits into from
Jun 27, 2019

Conversation

restlessadmin
Copy link
Contributor

@restlessadmin restlessadmin commented Jun 19, 2019

This superseeds #26933, and should contain all the fixes requested there.

@codecov
Copy link

codecov bot commented Jun 19, 2019

Codecov Report

Merging #26950 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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% <ø> (ø) ⬆️
#single 41.12% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/frame.py 96.89% <0%> (-0.12%) ⬇️
pandas/util/testing.py 90.94% <0%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d47947a...970fe33. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 19, 2019

Codecov Report

Merging #26950 into master will decrease coverage by 50.9%.
The diff coverage is 46.47%.

Impacted file tree graph

@@             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%) ⬇️
Impacted Files Coverage Δ
pandas/io/json/normalize.py 8.16% <ø> (-88.78%) ⬇️
pandas/core/arrays/integer.py 43.28% <ø> (-53.03%) ⬇️
pandas/core/indexes/datetimes.py 45.46% <ø> (-50.91%) ⬇️
pandas/core/indexes/multi.py 34.16% <ø> (-61.58%) ⬇️
pandas/core/config_init.py 86.61% <ø> (-9.2%) ⬇️
pandas/core/indexing.py 53.64% <ø> (-39.66%) ⬇️
pandas/core/reshape/tile.py 11.04% <ø> (-86.63%) ⬇️
pandas/core/sparse/scipy_sparse.py 10.14% <ø> (-89.86%) ⬇️
pandas/core/groupby/generic.py 14.82% <ø> (-74.52%) ⬇️
pandas/core/generic.py 38.45% <ø> (-55.75%) ⬇️
... and 195 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e955515...e85502c. Read the comment docs.

Copy link
Member

@datapythonista datapythonista left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

values in lowercase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected that line.

Copy link
Member

@datapythonista datapythonista left a 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).

@datapythonista
Copy link
Member

@jorisvandenbossche merge when you're happy (and when you have time to review, will take a bit ;) )

Copy link
Contributor

@jreback jreback left a 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.

@@ -119,7 +119,7 @@ Binary operator functions
Series.product
Series.dot

Function application, GroupBy & Window
Function application, GroupBy & window
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Groupby?

@jreback jreback added this to the 0.25.0 milestone Jun 21, 2019
@@ -505,7 +505,7 @@ If the method yields its value:

.. _docstring.see_also:

Section 5: See Also
Section 5: See also
Copy link
Member

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

~~~~~~~~~~~~~~

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
Copy link
Member

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.

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
Copy link
Member

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

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also revert this one

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`Rolling apply with a DataFrame returning a series
`Rolling apply with a DataFrame returning a Series

-----------------------------------------------------

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
N dimensional panels (experimental)
N dimensional Panels (experimental)

@@ -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:

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is still missing

@restlessadmin
Copy link
Contributor Author

restlessadmin commented Jun 21, 2019 via email

Copy link
Member

@datapythonista datapythonista left a 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!

~~~~~~~~~~~~~~

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
Copy link
Member

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.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same


df[['foo','qux']].columns.levels # sliced
df[['foo','qux']].columns # sliced
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -1099,7 +1099,7 @@ HDFStore

The :ref:`HDFStores <io.hdf5>` docs

`Simple Queries with a Timestamp Index
`Simple queries with a timestamp index
Copy link
Member

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

@@ -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
Copy link
Member

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

@@ -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
Copy link
Member

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

@@ -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
Copy link
Member

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

@@ -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:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is still missing

@jorisvandenbossche
Copy link
Member

@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.

@pep8speaks
Copy link

Hello @pmaxey83! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 3288:13: E741 ambiguous variable name 'l'

Copy link
Member

@datapythonista datapythonista left a 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?

@jorisvandenbossche jorisvandenbossche merged commit 1c0eb45 into pandas-dev:master Jun 27, 2019
@jorisvandenbossche
Copy link
Member

@pmaxey83 Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Make section title capitalization consistent
5 participants