Skip to content

Commit 5844197

Browse files
authored
DOC: capitalize Python as proper noun (#37808)
1 parent 0734fd8 commit 5844197

File tree

13 files changed

+31
-34
lines changed

13 files changed

+31
-34
lines changed

doc/source/development/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ Some other important things to know about the docs:
442442

443443
contributing_docstring.rst
444444

445-
* The tutorials make heavy use of the `ipython directive
445+
* The tutorials make heavy use of the `IPython directive
446446
<https://matplotlib.org/sampledoc/ipython_directive.html>`_ sphinx extension.
447447
This directive lets you put code in the documentation which will be run
448448
during the doc build. For example::

doc/source/development/contributing_docstring.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ The first conventions every Python docstring should follow are defined in
6363
`PEP-257 <https://www.python.org/dev/peps/pep-0257/>`_.
6464

6565
As PEP-257 is quite broad, other more specific standards also exist. In the
66-
case of pandas, the numpy docstring convention is followed. These conventions are
66+
case of pandas, the NumPy docstring convention is followed. These conventions are
6767
explained in this document:
6868

6969
* `numpydoc docstring guide <https://numpydoc.readthedocs.io/en/latest/format.html>`_
7070
(which is based in the original `Guide to NumPy/SciPy documentation
7171
<https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_)
7272

73-
numpydoc is a Sphinx extension to support the numpy docstring convention.
73+
numpydoc is a Sphinx extension to support the NumPy docstring convention.
7474

7575
The standard uses reStructuredText (reST). reStructuredText is a markup
7676
language that allows encoding styles in plain text files. Documentation
@@ -401,7 +401,7 @@ DataFrame:
401401
* pandas.Categorical
402402
* pandas.arrays.SparseArray
403403

404-
If the exact type is not relevant, but must be compatible with a numpy
404+
If the exact type is not relevant, but must be compatible with a NumPy
405405
array, array-like can be specified. If Any type that can be iterated is
406406
accepted, iterable can be used:
407407

@@ -819,7 +819,7 @@ positional arguments ``head(3)``.
819819
"""
820820
A sample DataFrame method.
821821
822-
Do not import numpy and pandas.
822+
Do not import NumPy and pandas.
823823
824824
Try to use meaningful data, when it makes the example easier
825825
to understand.
@@ -854,7 +854,7 @@ Tips for getting your examples pass the doctests
854854
Getting the examples pass the doctests in the validation script can sometimes
855855
be tricky. Here are some attention points:
856856

857-
* Import all needed libraries (except for pandas and numpy, those are already
857+
* Import all needed libraries (except for pandas and NumPy, those are already
858858
imported as ``import pandas as pd`` and ``import numpy as np``) and define
859859
all variables you use in the example.
860860

doc/source/development/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ and re-boxes it if necessary.
219219

220220
If applicable, we highly recommend that you implement ``__array_ufunc__`` in your
221221
extension array to avoid coercion to an ndarray. See
222-
`the numpy documentation <https://numpy.org/doc/stable/reference/generated/numpy.lib.mixins.NDArrayOperatorsMixin.html>`__
222+
`the NumPy documentation <https://numpy.org/doc/stable/reference/generated/numpy.lib.mixins.NDArrayOperatorsMixin.html>`__
223223
for an example.
224224

225225
As part of your implementation, we require that you defer to pandas when a pandas

doc/source/ecosystem.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ invoked with the following command
174174
175175
dtale.show(df)
176176
177-
D-Tale integrates seamlessly with jupyter notebooks, python terminals, kaggle
177+
D-Tale integrates seamlessly with Jupyter notebooks, Python terminals, Kaggle
178178
& Google Colab. Here are some demos of the `grid <http://alphatechadmin.pythonanywhere.com/>`__
179179
and `chart-builder <http://alphatechadmin.pythonanywhere.com/charts/4?chart_type=surface&query=&x=date&z=Col0&agg=raw&cpg=false&y=%5B%22security_id%22%5D>`__.
180180

@@ -421,7 +421,7 @@ If also displays progress bars.
421421
`Vaex <https://docs.vaex.io/>`__
422422
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
423423

424-
Increasingly, packages are being built on top of pandas to address specific needs in data preparation, analysis and visualization. Vaex is a python library for Out-of-Core DataFrames (similar to pandas), to visualize and explore big tabular datasets. It can calculate statistics such as mean, sum, count, standard deviation etc, on an N-dimensional grid up to a billion (10\ :sup:`9`) objects/rows per second. Visualization is done using histograms, density plots and 3d volume rendering, allowing interactive exploration of big data. Vaex uses memory mapping, zero memory copy policy and lazy computations for best performance (no memory wasted).
424+
Increasingly, packages are being built on top of pandas to address specific needs in data preparation, analysis and visualization. Vaex is a Python library for Out-of-Core DataFrames (similar to pandas), to visualize and explore big tabular datasets. It can calculate statistics such as mean, sum, count, standard deviation etc, on an N-dimensional grid up to a billion (10\ :sup:`9`) objects/rows per second. Visualization is done using histograms, density plots and 3d volume rendering, allowing interactive exploration of big data. Vaex uses memory mapping, zero memory copy policy and lazy computations for best performance (no memory wasted).
425425

426426
* vaex.from_pandas
427427
* vaex.to_pandas_df

doc/source/getting_started/intro_tutorials/04_plotting.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ standard Python to get an overview of the available plot methods:
131131
]
132132
133133
.. note::
134-
In many development environments as well as ipython and
135-
jupyter notebook, use the TAB button to get an overview of the available
134+
In many development environments as well as IPython and
135+
Jupyter Notebook, use the TAB button to get an overview of the available
136136
methods, for example ``air_quality.plot.`` + TAB.
137137

138138
One of the options is :meth:`DataFrame.plot.box`, which refers to a

doc/source/user_guide/10min.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ Select via the position of the passed integers:
239239
240240
df.iloc[3]
241241
242-
By integer slices, acting similar to numpy/python:
242+
By integer slices, acting similar to numpy/Python:
243243

244244
.. ipython:: python
245245
246246
df.iloc[3:5, 0:2]
247247
248-
By lists of integer position locations, similar to the numpy/python style:
248+
By lists of integer position locations, similar to the NumPy/Python style:
249249

250250
.. ipython:: python
251251

doc/source/user_guide/basics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ For example, we can fit a regression using statsmodels. Their API expects a form
845845
846846
The pipe method is inspired by unix pipes and more recently dplyr_ and magrittr_, which
847847
have introduced the popular ``(%>%)`` (read pipe) operator for R_.
848-
The implementation of ``pipe`` here is quite clean and feels right at home in python.
848+
The implementation of ``pipe`` here is quite clean and feels right at home in Python.
849849
We encourage you to view the source code of :meth:`~DataFrame.pipe`.
850850

851851
.. _dplyr: https://github.com/hadley/dplyr
@@ -2203,7 +2203,7 @@ You can use the :meth:`~DataFrame.astype` method to explicitly convert dtypes fr
22032203
even if the dtype was unchanged (pass ``copy=False`` to change this behavior). In addition, they will raise an
22042204
exception if the astype operation is invalid.
22052205

2206-
Upcasting is always according to the **numpy** rules. If two different dtypes are involved in an operation,
2206+
Upcasting is always according to the **NumPy** rules. If two different dtypes are involved in an operation,
22072207
then the more *general* one will be used as the result of the operation.
22082208

22092209
.. ipython:: python

doc/source/user_guide/cookbook.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ above what the in-line examples offer.
1818
pandas (pd) and Numpy (np) are the only two abbreviated imported modules. The rest are kept
1919
explicitly imported for newer users.
2020

21-
These examples are written for Python 3. Minor tweaks might be necessary for earlier python
22-
versions.
23-
2421
Idioms
2522
------
2623

@@ -71,7 +68,7 @@ Or use pandas where after you've set up a mask
7168
)
7269
df.where(df_mask, -1000)
7370
74-
`if-then-else using numpy's where()
71+
`if-then-else using NumPy's where()
7572
<https://stackoverflow.com/questions/19913659/pandas-conditional-creation-of-a-series-dataframe-column>`__
7673

7774
.. ipython:: python
@@ -1013,7 +1010,7 @@ The :ref:`Plotting <visualization>` docs.
10131010
`Setting x-axis major and minor labels
10141011
<https://stackoverflow.com/questions/12945971/pandas-timeseries-plot-setting-x-axis-major-and-minor-ticks-and-labels>`__
10151012

1016-
`Plotting multiple charts in an ipython notebook
1013+
`Plotting multiple charts in an IPython Jupyter notebook
10171014
<https://stackoverflow.com/questions/16392921/make-more-than-one-chart-in-same-ipython-notebook-cell>`__
10181015

10191016
`Creating a multi-line plot

doc/source/user_guide/enhancingperf.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ hence we'll concentrate our efforts cythonizing these two functions.
9696
Plain Cython
9797
~~~~~~~~~~~~
9898

99-
First we're going to need to import the Cython magic function to ipython:
99+
First we're going to need to import the Cython magic function to IPython:
100100

101101
.. ipython:: python
102102
:okwarning:
@@ -123,7 +123,7 @@ is here to distinguish between function versions):
123123
.. note::
124124

125125
If you're having trouble pasting the above into your ipython, you may need
126-
to be using bleeding edge ipython for paste to play well with cell magics.
126+
to be using bleeding edge IPython for paste to play well with cell magics.
127127

128128

129129
.. code-block:: ipython
@@ -160,7 +160,7 @@ We get another huge improvement simply by providing type information:
160160
In [4]: %timeit df.apply(lambda x: integrate_f_typed(x["a"], x["b"], x["N"]), axis=1)
161161
10 loops, best of 3: 20.3 ms per loop
162162
163-
Now, we're talking! It's now over ten times faster than the original python
163+
Now, we're talking! It's now over ten times faster than the original Python
164164
implementation, and we haven't *really* modified the code. Let's have another
165165
look at what's eating up time:
166166

doc/source/user_guide/groupby.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ accepts the special syntax in :meth:`GroupBy.agg`, known as "named aggregation",
672672
)
673673
674674
675-
If your desired output column names are not valid python keywords, construct a dictionary
675+
If your desired output column names are not valid Python keywords, construct a dictionary
676676
and unpack the keyword arguments
677677

678678
.. ipython:: python
@@ -1090,7 +1090,7 @@ will be passed into ``values``, and the group index will be passed into ``index`
10901090
.. warning::
10911091

10921092
When using ``engine='numba'``, there will be no "fall back" behavior internally. The group
1093-
data and group index will be passed as numpy arrays to the JITed user defined function, and no
1093+
data and group index will be passed as NumPy arrays to the JITed user defined function, and no
10941094
alternative execution attempts will be tried.
10951095

10961096
.. note::

doc/source/user_guide/indexing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ of multi-axis indexing.
5555
*label* of the index. This use is **not** an integer position along the
5656
index.).
5757
* A list or array of labels ``['a', 'b', 'c']``.
58-
* A slice object with labels ``'a':'f'`` (Note that contrary to usual python
58+
* A slice object with labels ``'a':'f'`` (Note that contrary to usual Python
5959
slices, **both** the start and the stop are included, when present in the
6060
index! See :ref:`Slicing with labels <indexing.slicing_with_labels>`
6161
and :ref:`Endpoints are inclusive <advanced.endpoints_are_inclusive>`.)
@@ -327,7 +327,7 @@ The ``.loc`` attribute is the primary access method. The following are valid inp
327327

328328
* A single label, e.g. ``5`` or ``'a'`` (Note that ``5`` is interpreted as a *label* of the index. This use is **not** an integer position along the index.).
329329
* A list or array of labels ``['a', 'b', 'c']``.
330-
* A slice object with labels ``'a':'f'`` (Note that contrary to usual python
330+
* A slice object with labels ``'a':'f'`` (Note that contrary to usual Python
331331
slices, **both** the start and the stop are included, when present in the
332332
index! See :ref:`Slicing with labels <indexing.slicing_with_labels>`.
333333
* A boolean array.
@@ -509,11 +509,11 @@ For getting a cross section using an integer position (equiv to ``df.xs(1)``):
509509
510510
df1.iloc[1]
511511
512-
Out of range slice indexes are handled gracefully just as in Python/Numpy.
512+
Out of range slice indexes are handled gracefully just as in Python/NumPy.
513513

514514
.. ipython:: python
515515
516-
# these are allowed in python/numpy.
516+
# these are allowed in Python/NumPy.
517517
x = list('abcdef')
518518
x
519519
x[4:10]

doc/source/user_guide/options.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ are restored automatically when you exit the ``with`` block:
124124
Setting startup options in Python/IPython environment
125125
-----------------------------------------------------
126126

127-
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:
127+
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:
128128

129129
.. code-block:: none
130130
131131
$IPYTHONDIR/profile_default/startup
132132
133-
More information can be found in the `ipython documentation
133+
More information can be found in the `IPython documentation
134134
<https://ipython.org/ipython-doc/stable/interactive/tutorial.html#startup-files>`__. An example startup script for pandas is displayed below:
135135

136136
.. code-block:: python
@@ -332,7 +332,7 @@ display.large_repr truncate For DataFrames exceeding ma
332332
(the behaviour in earlier versions of pandas).
333333
allowable settings, ['truncate', 'info']
334334
display.latex.repr False Whether to produce a latex DataFrame
335-
representation for jupyter frontends
335+
representation for Jupyter frontends
336336
that support it.
337337
display.latex.escape True Escapes special characters in DataFrames, when
338338
using the to_latex method.
@@ -413,7 +413,7 @@ display.show_dimensions truncate Whether to print out dimens
413413
frame is truncated (e.g. not display
414414
all rows and/or columns)
415415
display.width 80 Width of the display in characters.
416-
In case python/IPython is running in
416+
In case Python/IPython is running in
417417
a terminal this can be set to None
418418
and pandas will correctly auto-detect
419419
the width. Note that the IPython notebook,

doc/source/user_guide/sparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ sparse values instead.
179179
rather than a SparseSeries or SparseDataFrame.
180180

181181
This section provides some guidance on migrating your code to the new style. As a reminder,
182-
you can use the python warnings module to control warnings. But we recommend modifying
182+
you can use the Python warnings module to control warnings. But we recommend modifying
183183
your code, rather than ignoring the warning.
184184

185185
**Construction**

0 commit comments

Comments
 (0)