-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Add sphinx spelling extension #21109
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
Changes from 7 commits
615d007
f6481aa
fc9a960
4117a9c
a2fe8b9
39482e0
c99a15d
18dc19c
d929098
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,9 +228,9 @@ Grouping by more than one column is done by passing a list of columns to the | |
JOIN | ||
---- | ||
JOINs can be performed with :meth:`~pandas.DataFrame.join` or :meth:`~pandas.merge`. By default, | ||
:meth:`~pandas.DataFrame.join` will join the DataFrames on their indices. Each method has | ||
:meth:`~pandas.DataFrame.join` will join the DataFrames on their indexes. Each method has | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry if I missed it before but any reason we changed these? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw both terms in the documentation and since the spelling marked indices as wrong I changed a lot of them that's the reason why. I can revert these changes 😃 👍 |
||
parameters allowing you to specify the type of join to perform (LEFT, RIGHT, INNER, FULL) or the | ||
columns to join on (column names or indices). | ||
columns to join on (column names or indexes). | ||
|
||
.. ipython:: python | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -436,6 +436,25 @@ the documentation are also built by Travis-CI. These docs are then hosted `here | |
<http://pandas-docs.github.io/pandas-docs-travis>`__, see also | ||
the :ref:`Continuous Integration <contributing.ci>` section. | ||
|
||
Spell checking documentation | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
When contributing to documentation to **pandas** it's good to check if your work | ||
contains any spelling errors. Sphinx provides an easy way to spell check documentation | ||
and docstrings. | ||
|
||
Running the spell check is easy. Just navigate to your local ``pandas/doc/`` directory and run:: | ||
|
||
python make.py spellcheck | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we alternately add a rule to the Makefile so that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't think about this my apologies I'll add the spellcheck on the makefile 👍 |
||
|
||
The spellcheck will take a few minutes to run (between 1 to 6 minutes). Sphinx will alert you | ||
with warnings and misspelt words - these misspelt words will be added to a file called | ||
``output.txt`` and you can find it on your local directory ``pandas/doc/build/spelling/``. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not saying this is a bad thing but any reason you chose to output to a text file instead of to STDOUT? All of the other checks I can think of off the top of my head would write to the latter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, I didn't choose such approach. The spelling library is coded in this way (I checked the source code), it will always output a text file with all the misspelt words. To be honest I would much rather work with STDOUT and avoid calling open on a file to check if it was empty |
||
|
||
The Sphinx spelling extension uses an EN-US dictionary to correct words, what means that in | ||
some cases you might need to add a word to this dictionary. You can do so by adding the word to | ||
the bag-of-words file named ``spelling_wordlist.txt`` located in the folder ``pandas/doc/``. | ||
|
||
.. _contributing.code: | ||
|
||
Contributing to the code base | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -286,7 +286,7 @@ New Columns | |
df = pd.DataFrame( | ||
{'AAA' : [1,1,1,2,2,2,3,3], 'BBB' : [2,1,3,4,5,1,2,3]}); df | ||
|
||
Method 1 : idxmin() to get the index of the mins | ||
Method 1 : idxmin() to get the index of the minimums | ||
|
||
.. ipython:: python | ||
|
||
|
@@ -307,7 +307,7 @@ MultiIndexing | |
|
||
The :ref:`multindexing <advanced.hierarchical>` docs. | ||
|
||
`Creating a multi-index from a labeled frame | ||
`Creating a MultiIndex from a labeled frame | ||
<http://stackoverflow.com/questions/14916358/reshaping-dataframes-in-pandas-based-on-column-labels>`__ | ||
|
||
.. ipython:: python | ||
|
@@ -330,7 +330,7 @@ The :ref:`multindexing <advanced.hierarchical>` docs. | |
Arithmetic | ||
********** | ||
|
||
`Performing arithmetic with a multi-index that needs broadcasting | ||
`Performing arithmetic with a MultiIndex that needs broadcasting | ||
<http://stackoverflow.com/questions/19501510/divide-entire-pandas-multiindex-dataframe-by-dataframe-variable/19502176#19502176>`__ | ||
|
||
.. ipython:: python | ||
|
@@ -342,7 +342,7 @@ Arithmetic | |
Slicing | ||
******* | ||
|
||
`Slicing a multi-index with xs | ||
`Slicing a MultiIndex with xs | ||
<http://stackoverflow.com/questions/12590131/how-to-slice-multindex-columns-in-pandas-dataframes>`__ | ||
|
||
.. ipython:: python | ||
|
@@ -363,7 +363,7 @@ To take the cross section of the 1st level and 1st axis the index: | |
|
||
df.xs('six',level=1,axis=0) | ||
|
||
`Slicing a multi-index with xs, method #2 | ||
`Slicing a MultiIndex with xs, method #2 | ||
<http://stackoverflow.com/questions/14964493/multiindex-based-indexing-in-pandas>`__ | ||
|
||
.. ipython:: python | ||
|
@@ -386,13 +386,13 @@ To take the cross section of the 1st level and 1st axis the index: | |
df.loc[(All,'Math'),('Exams')] | ||
df.loc[(All,'Math'),(All,'II')] | ||
|
||
`Setting portions of a multi-index with xs | ||
`Setting portions of a MultiIndex with xs | ||
<http://stackoverflow.com/questions/19319432/pandas-selecting-a-lower-level-in-a-dataframe-to-do-a-ffill>`__ | ||
|
||
Sorting | ||
******* | ||
|
||
`Sort by specific column or an ordered list of columns, with a multi-index | ||
`Sort by specific column or an ordered list of columns, with a MultiIndex | ||
<http://stackoverflow.com/questions/14733871/mutli-index-sorting-in-pandas>`__ | ||
|
||
.. ipython:: python | ||
|
@@ -664,7 +664,7 @@ The :ref:`Pivot <reshaping.pivot>` docs. | |
`Plot pandas DataFrame with year over year data | ||
<http://stackoverflow.com/questions/30379789/plot-pandas-data-frame-with-year-over-year-data>`__ | ||
|
||
To create year and month crosstabulation: | ||
To create year and month cross tabulation: | ||
|
||
.. ipython:: python | ||
|
||
|
@@ -677,7 +677,7 @@ To create year and month crosstabulation: | |
Apply | ||
***** | ||
|
||
`Rolling Apply to Organize - Turning embedded lists into a multi-index frame | ||
`Rolling Apply to Organize - Turning embedded lists into a MultiIndex frame | ||
<http://stackoverflow.com/questions/17349981/converting-pandas-dataframe-with-categorical-values-into-binary-values>`__ | ||
|
||
.. ipython:: python | ||
|
@@ -1029,8 +1029,8 @@ Skip row between header and data | |
01.01.1990 05:00;21;11;12;13 | ||
""" | ||
|
||
Option 1: pass rows explicitly to skiprows | ||
"""""""""""""""""""""""""""""""""""""""""" | ||
Option 1: pass rows explicitly to skip rows | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have to be careful when changing headers - I think you now need another double quote on the line below for proper rendering |
||
""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
.. ipython:: python | ||
|
||
|
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.
Still think inplace as a term is fine, especially since it aligns with the keyword used for the concept throughout pandas