-
-
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 1 commit
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 |
---|---|---|
|
@@ -645,7 +645,7 @@ the quarter end: | |
ts.index = (prng.asfreq('M', 'e') + 1).asfreq('H', 's') + 9 | ||
ts.head() | ||
|
||
Categoricals | ||
Categorical | ||
------------ | ||
|
||
pandas can include categorical data in a ``DataFrame``. For full docs, see the | ||
|
@@ -663,7 +663,7 @@ Convert the raw grades to a categorical data type. | |
df["grade"] | ||
|
||
Rename the categories to more meaningful names (assigning to | ||
``Series.cat.categories`` is inplace!). | ||
``Series.cat.categories`` is in place!). | ||
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 think we should be making an exception for |
||
|
||
.. ipython:: python | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,7 +182,7 @@ For example: | |
df[['foo','qux']].columns # sliced | ||
|
||
This is done to avoid a recomputation of the levels in order to make slicing | ||
highly performant. If you want to see only the used levels, you can use the | ||
highly efficient. If you want to see only the used levels, you can use the | ||
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'd still stick with performant - there's some overlap but still not quite perfect synonyms |
||
:func:`MultiIndex.get_level_values` method. | ||
|
||
.. ipython:: python | ||
|
@@ -387,7 +387,7 @@ Furthermore you can *set* the values using the following methods. | |
df2.loc(axis=0)[:, :, ['C1', 'C3']] = -10 | ||
df2 | ||
|
||
You can use a right-hand-side of an alignable object as well. | ||
You can use a right-hand-side of an align object as well. | ||
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 think alignable is OK. |
||
|
||
.. ipython:: python | ||
|
||
|
@@ -559,7 +559,7 @@ return a copy of the data rather than a view: | |
|
||
.. _advanced.unsorted: | ||
|
||
Furthermore if you try to index something that is not fully lexsorted, this can raise: | ||
Furthermore if you try to index something that is not fully lex-sorted, this can raise: | ||
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've never seen "lex-sorted" before, so I'd stick with the original spelling here |
||
|
||
.. code-block:: ipython | ||
|
||
|
@@ -593,7 +593,7 @@ Take Methods | |
|
||
Similar to NumPy ndarrays, pandas Index, Series, and DataFrame also provides | ||
the ``take`` method that retrieves elements along a given axis at the given | ||
indices. The given indices must be either a list or an ndarray of integer | ||
indexes. The given indexes must be either a list or an ndarray of integer | ||
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. Prefer |
||
index positions. ``take`` will also accept negative integers as relative positions to the end of the object. | ||
|
||
.. ipython:: python | ||
|
@@ -611,7 +611,7 @@ index positions. ``take`` will also accept negative integers as relative positio | |
ser.iloc[positions] | ||
ser.take(positions) | ||
|
||
For DataFrames, the given indices should be a 1d list or ndarray that specifies | ||
For DataFrames, the given indexes should be a 1d list or ndarray that specifies | ||
row or column positions. | ||
|
||
.. ipython:: python | ||
|
@@ -623,7 +623,7 @@ row or column positions. | |
frm.take([0, 2], axis=1) | ||
|
||
It is important to note that the ``take`` method on pandas objects are not | ||
intended to work on boolean indices and may return unexpected results. | ||
intended to work on boolean indexes and may return unexpected results. | ||
|
||
.. ipython:: python | ||
|
||
|
@@ -711,7 +711,7 @@ order is ``cab``). | |
|
||
df2.sort_index() | ||
|
||
Groupby operations on the index will preserve the index nature as well. | ||
Group by operations on the index will preserve the index nature as well. | ||
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. Can probably add groupby to the wordlist. |
||
|
||
.. ipython:: python | ||
|
||
|
@@ -990,7 +990,7 @@ On the other hand, if the index is not monotonic, then both slice bounds must be | |
KeyError: 'Cannot get right slice bound for non-unique label: 3' | ||
|
||
:meth:`Index.is_monotonic_increasing` and :meth:`Index.is_monotonic_decreasing` only check that | ||
an index is weakly monotonic. To check for strict montonicity, you can combine one of those with | ||
an index is weakly monotonic. To check for strict monotonicity, you can combine one of those with | ||
:meth:`Index.is_unique` | ||
|
||
.. ipython:: python | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -370,7 +370,7 @@ Renaming categories is done by assigning new values to the | |
|
||
.. note:: | ||
|
||
Be aware that assigning new categories is an inplace operation, while most other operations | ||
Be aware that assigning new categories is an in place operation, while most other operations | ||
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. Still think inplace as a term is fine, especially since it aligns with the keyword used for the concept throughout pandas |
||
under ``Series.cat`` per default return a new ``Series`` of dtype `category`. | ||
|
||
Categories must be unique or a `ValueError` is raised: | ||
|
@@ -847,7 +847,7 @@ the categories being combined. | |
|
||
By default, the resulting categories will be ordered as | ||
they appear in the data. If you want the categories to | ||
be lexsorted, use ``sort_categories=True`` argument. | ||
be lex-sorted, use ``sort_categories=True`` argument. | ||
|
||
.. ipython:: python | ||
|
||
|
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 |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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 | ||
|
||
|
@@ -723,7 +723,7 @@ Rolling Apply to multiple columns where function returns a Scalar (Volume Weight | |
s = pd.concat([ (pd.Series(vwap(df.iloc[i:i+window]), index=[df.index[i+window]])) for i in range(len(df)-window) ]); | ||
s.round(2) | ||
|
||
Timeseries | ||
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. Add timeseries to the wordlist? |
||
Time series | ||
---------- | ||
|
||
`Between times | ||
|
@@ -1029,7 +1029,7 @@ 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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -942,7 +942,7 @@ that is itself a series, and possibly upcast the result to a DataFrame: | |
|
||
``apply`` can act as a reducer, transformer, *or* filter function, depending on exactly what is passed to it. | ||
So depending on the path taken, and exactly what you are grouping. Thus the grouped columns(s) may be included in | ||
the output as well as set the indices. | ||
the output as well as set the indexes. | ||
|
||
.. warning:: | ||
|
||
|
@@ -994,7 +994,7 @@ is only interesting over one column (here ``colname``), it may be filtered | |
Handling of (un)observed Categorical values | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
When using a ``Categorical`` grouper (as a single grouper, or as part of multipler groupers), the ``observed`` keyword | ||
When using a ``Categorical`` grouper (as a single grouper, or as part of multiple groupers), the ``observed`` keyword | ||
controls whether to return a cartesian product of all possible groupers values (``observed=False``) or only those | ||
that are observed groupers (``observed=True``). | ||
|
||
|
@@ -1010,7 +1010,7 @@ Show only the observed values: | |
|
||
pd.Series([1, 1, 1]).groupby(pd.Categorical(['a', 'a', 'a'], categories=['a', 'b']), observed=True).count() | ||
|
||
The returned dtype of the grouped will *always* include *all* of the catergories that were grouped. | ||
The returned dtype of the grouped will *always* include *all* of the categories that were grouped. | ||
|
||
.. ipython:: python | ||
|
||
|
@@ -1328,11 +1328,11 @@ Groupby by Indexer to 'resample' data | |
|
||
Resampling produces new hypothetical samples (resamples) from already existing observed data or from a model that generates data. These new samples are similar to the pre-existing samples. | ||
|
||
In order to resample to work on indices that are non-datetimelike, the following procedure can be utilized. | ||
In order to resample to work on indexes that are non-datetimelike, the following procedure can be utilized. | ||
|
||
In the following examples, **df.index // 5** returns a binary array which is used to determine what gets selected for the groupby operation. | ||
|
||
.. note:: The below example shows how we can downsample by consolidation of samples into fewer samples. Here by using **df.index // 5**, we are aggregating the samples in bins. By applying **std()** function, we aggregate the information contained in many samples into a small subset of values which is their standard deviation thereby reducing the number of samples. | ||
.. note:: The below example shows how we can down-sample by consolidation of samples into fewer samples. Here by using **df.index // 5**, we are aggregating the samples in bins. By applying **std()** function, we aggregate the information contained in many samples into a small subset of values which is their standard deviation thereby reducing the number of samples. | ||
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. Think downsample should be an exception |
||
|
||
.. 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.
Let's keep this, to not break links.