Skip to content

Commit 3675737

Browse files
authored
STYLE: Pandas codespell fix for documentation (#40280)
* STYLE: Extending codespell to docs * DOC: small fix in documentation
1 parent 4810d74 commit 3675737

12 files changed

+19
-19
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
hooks:
1616
- id: codespell
1717
types_or: [python, rst, markdown]
18-
files: ^pandas/
18+
files: ^(pandas|doc)/
1919
exclude: ^pandas/tests/
2020
- repo: https://github.com/pre-commit/pre-commit-hooks
2121
rev: v3.4.0

doc/source/development/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ to run its checks with::
714714

715715
without needing to have done ``pre-commit install`` beforehand.
716716

717-
If you want to run checks on all recently commited files on upstream/master you can use::
717+
If you want to run checks on all recently committed files on upstream/master you can use::
718718

719719
pre-commit run --from-ref=upstream/master --to-ref=HEAD --all-files
720720

doc/source/development/debugging_extensions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Now go ahead and execute your script:
6161
6262
run <the_script>.py
6363
64-
Code execution will halt at the breakpoint defined or at the occurance of any segfault. LLDB's `GDB to LLDB command map <https://lldb.llvm.org/use/map.html>`_ provides a listing of debugger command that you can execute using either debugger.
64+
Code execution will halt at the breakpoint defined or at the occurrence of any segfault. LLDB's `GDB to LLDB command map <https://lldb.llvm.org/use/map.html>`_ provides a listing of debugger command that you can execute using either debugger.
6565

6666
Another option to execute the entire test suite under lldb would be to run the following:
6767

doc/source/getting_started/comparison/comparison_with_spreadsheets.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,4 +461,4 @@ pandas' :meth:`~DataFrame.replace` is comparable to Excel's ``Replace All``.
461461

462462
.. ipython:: python
463463
464-
tips.replace("Thur", "Thu")
464+
tips.replace("Thu", "Thursday")

doc/source/getting_started/comparison/comparison_with_sql.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ to your grouped DataFrame, indicating which functions to apply to specific colum
193193
Fri 2.734737 19
194194
Sat 2.993103 87
195195
Sun 3.255132 76
196-
Thur 2.771452 62
196+
Thu 2.771452 62
197197
*/
198198
199199
.. ipython:: python
@@ -213,11 +213,11 @@ Grouping by more than one column is done by passing a list of columns to the
213213
No Fri 4 2.812500
214214
Sat 45 3.102889
215215
Sun 57 3.167895
216-
Thur 45 2.673778
216+
Thu 45 2.673778
217217
Yes Fri 15 2.714000
218218
Sat 42 2.875476
219219
Sun 19 3.516842
220-
Thur 17 3.030000
220+
Thu 17 3.030000
221221
*/
222222
223223
.. ipython:: python

doc/source/user_guide/dsintro.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -869,5 +869,5 @@ completion mechanism so they can be tab-completed:
869869

870870
.. code-block:: ipython
871871
872-
In [5]: df.fo<TAB> # noqa: E225, E999
872+
In [5]: df.foo<TAB> # noqa: E225, E999
873873
df.foo1 df.foo2

doc/source/user_guide/io.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2189,7 +2189,7 @@ into a flat table.
21892189
21902190
data = [
21912191
{"id": 1, "name": {"first": "Coleen", "last": "Volk"}},
2192-
{"name": {"given": "Mose", "family": "Regner"}},
2192+
{"name": {"given": "Mark", "family": "Regner"}},
21932193
{"id": 2, "name": "Faye Raker"},
21942194
]
21952195
pd.json_normalize(data)
@@ -2995,7 +2995,7 @@ For example, below XML contains a namespace with prefix, ``doc``, and URI at
29952995
29962996
Similarly, an XML document can have a default namespace without prefix. Failing
29972997
to assign a temporary prefix will return no nodes and raise a ``ValueError``.
2998-
But assiging *any* temporary name to correct URI allows parsing by nodes.
2998+
But assigning *any* temporary name to correct URI allows parsing by nodes.
29992999

30003000
.. ipython:: python
30013001

doc/source/user_guide/window.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ which will first group the data by the specified keys and then perform a windowi
7979
.. versionadded:: 1.3
8080

8181
Some windowing operations also support the ``method='table'`` option in the constructor which
82-
performs the windowing operaion over an entire :class:`DataFrame` instead of a single column or row at a time.
82+
performs the windowing operation over an entire :class:`DataFrame` instead of a single column or row at a time.
8383
This can provide a useful performance benefit for a :class:`DataFrame` with many columns or rows
8484
(with the corresponding ``axis`` argument) or the ability to utilize other columns during the windowing
8585
operation. The ``method='table'`` option can only be used if ``engine='numba'`` is specified

doc/source/whatsnew/v0.20.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ Deprecations
13261326
Deprecate ``.ix``
13271327
^^^^^^^^^^^^^^^^^
13281328

1329-
The ``.ix`` indexer is deprecated, in favor of the more strict ``.iloc`` and ``.loc`` indexers. ``.ix`` offers a lot of magic on the inference of what the user wants to do. To wit, ``.ix`` can decide to index *positionally* OR via *labels*, depending on the data type of the index. This has caused quite a bit of user confusion over the years. The full indexing documentation is :ref:`here <indexing>`. (:issue:`14218`)
1329+
The ``.ix`` indexer is deprecated, in favor of the more strict ``.iloc`` and ``.loc`` indexers. ``.ix`` offers a lot of magic on the inference of what the user wants to do. More specifically, ``.ix`` can decide to index *positionally* OR via *labels*, depending on the data type of the index. This has caused quite a bit of user confusion over the years. The full indexing documentation is :ref:`here <indexing>`. (:issue:`14218`)
13301330

13311331
The recommended methods of indexing are:
13321332

doc/source/whatsnew/v1.2.1.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Fixed regressions
1818
- Fixed regression in :meth:`~DataFrame.to_csv` opening ``codecs.StreamReaderWriter`` in binary mode instead of in text mode (:issue:`39247`)
1919
- Fixed regression in :meth:`read_csv` and other read functions were the encoding error policy (``errors``) did not default to ``"replace"`` when no encoding was specified (:issue:`38989`)
2020
- Fixed regression in :func:`read_excel` with non-rawbyte file handles (:issue:`38788`)
21-
- Fixed regression in :meth:`DataFrame.to_stata` not removing the created file when an error occured (:issue:`39202`)
21+
- Fixed regression in :meth:`DataFrame.to_stata` not removing the created file when an error occurred (:issue:`39202`)
2222
- Fixed regression in ``DataFrame.__setitem__`` raising ``ValueError`` when expanding :class:`DataFrame` and new column is from type ``"0 - name"`` (:issue:`39010`)
2323
- Fixed regression in setting with :meth:`DataFrame.loc` raising ``ValueError`` when :class:`DataFrame` has unsorted :class:`MultiIndex` columns and indexer is a scalar (:issue:`38601`)
2424
- Fixed regression in setting with :meth:`DataFrame.loc` raising ``KeyError`` with :class:`MultiIndex` and list-like columns indexer enlarging :class:`DataFrame` (:issue:`39147`)
@@ -135,7 +135,7 @@ Other
135135
- Bumped minimum fastparquet version to 0.4.0 to avoid ``AttributeError`` from numba (:issue:`38344`)
136136
- Bumped minimum pymysql version to 0.8.1 to avoid test failures (:issue:`38344`)
137137
- Fixed build failure on MacOS 11 in Python 3.9.1 (:issue:`38766`)
138-
- Added reference to backwards incompatible ``check_freq`` arg of :func:`testing.assert_frame_equal` and :func:`testing.assert_series_equal` in :ref:`pandas 1.1.0 whats new <whatsnew_110.api_breaking.testing.check_freq>` (:issue:`34050`)
138+
- Added reference to backwards incompatible ``check_freq`` arg of :func:`testing.assert_frame_equal` and :func:`testing.assert_series_equal` in :ref:`pandas 1.1.0 what's new <whatsnew_110.api_breaking.testing.check_freq>` (:issue:`34050`)
139139

140140
.. ---------------------------------------------------------------------------
141141

doc/source/whatsnew/v1.3.0.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ Performance improvements
382382
- Performance improvement in :meth:`core.window.rolling.Rolling.corr` and :meth:`core.window.rolling.Rolling.cov` (:issue:`39388`)
383383
- Performance improvement in :meth:`core.window.rolling.RollingGroupby.corr`, :meth:`core.window.expanding.ExpandingGroupby.corr`, :meth:`core.window.expanding.ExpandingGroupby.corr` and :meth:`core.window.expanding.ExpandingGroupby.cov` (:issue:`39591`)
384384
- Performance improvement in :func:`unique` for object data type (:issue:`37615`)
385-
- Performance improvement in :func:`pd.json_normalize` for basic cases (including seperators) (:issue:`40035` :issue:`15621`)
385+
- Performance improvement in :func:`pd.json_normalize` for basic cases (including separators) (:issue:`40035` :issue:`15621`)
386386
- Performance improvement in :class:`core.window.rolling.ExpandingGroupby` aggregation methods (:issue:`39664`)
387387
- Performance improvement in :class:`Styler` where render times are more than 50% reduced (:issue:`39972` :issue:`39952`)
388388
- Performance improvement in :meth:`core.window.ewm.ExponentialMovingWindow.mean` with ``times`` (:issue:`39784`)
@@ -464,7 +464,7 @@ Interval
464464
- Bug in :meth:`IntervalIndex.intersection` and :meth:`IntervalIndex.symmetric_difference` always returning object-dtype when operating with :class:`CategoricalIndex` (:issue:`38653`, :issue:`38741`)
465465
- Bug in :meth:`IntervalIndex.intersection` returning duplicates when at least one of both Indexes has duplicates which are present in the other (:issue:`38743`)
466466
- :meth:`IntervalIndex.union`, :meth:`IntervalIndex.intersection`, :meth:`IntervalIndex.difference`, and :meth:`IntervalIndex.symmetric_difference` now cast to the appropriate dtype instead of raising ``TypeError`` when operating with another :class:`IntervalIndex` with incompatible dtype (:issue:`39267`)
467-
- :meth:`PeriodIndex.union`, :meth:`PeriodIndex.intersection`, :meth:`PeriodIndex.symmetric_difference`, :meth:`PeriodIndex.difference` now cast to object dtype instead of raising ``IncompatibleFrequency`` when opearting with another :class:`PeriodIndex` with incompatible dtype (:issue:`??`)
467+
- :meth:`PeriodIndex.union`, :meth:`PeriodIndex.intersection`, :meth:`PeriodIndex.symmetric_difference`, :meth:`PeriodIndex.difference` now cast to object dtype instead of raising ``IncompatibleFrequency`` when operating with another :class:`PeriodIndex` with incompatible dtype (:issue:`??`)
468468

469469
Indexing
470470
^^^^^^^^
@@ -525,7 +525,7 @@ I/O
525525
- Bug in :func:`to_hdf` raising ``KeyError`` when trying to apply for subclasses of ``DataFrame`` or ``Series`` (:issue:`33748`)
526526
- Bug in :meth:`~HDFStore.put` raising a wrong ``TypeError`` when saving a DataFrame with non-string dtype (:issue:`34274`)
527527
- Bug in :func:`json_normalize` resulting in the first element of a generator object not being included in the returned ``DataFrame`` (:issue:`35923`)
528-
- Bug in :func:`read_csv` apllying thousands separator to date columns when column should be parsed for dates and ``usecols`` is specified for ``engine="python"`` (:issue:`39365`)
528+
- Bug in :func:`read_csv` applying thousands separator to date columns when column should be parsed for dates and ``usecols`` is specified for ``engine="python"`` (:issue:`39365`)
529529
- Bug in :func:`read_excel` forward filling :class:`MultiIndex` names with multiple header and index columns specified (:issue:`34673`)
530530
- :func:`read_excel` now respects :func:`set_option` (:issue:`34252`)
531531
- Bug in :func:`read_csv` not switching ``true_values`` and ``false_values`` for nullable ``boolean`` dtype (:issue:`34655`)
@@ -603,7 +603,7 @@ ExtensionArray
603603

604604
Other
605605
^^^^^
606-
- Bug in :class:`Index` constructor sometimes silently ignorning a specified ``dtype`` (:issue:`38879`)
606+
- Bug in :class:`Index` constructor sometimes silently ignoring a specified ``dtype`` (:issue:`38879`)
607607
- Bug in :func:`pandas.api.types.infer_dtype` not recognizing Series, Index or array with a period dtype (:issue:`23553`)
608608
- Bug in :func:`pandas.api.types.infer_dtype` raising an error for general :class:`.ExtensionArray` objects. It will now return ``"unknown-array"`` instead of raising (:issue:`37367`)
609609
- Bug in constructing a :class:`Series` from a list and a :class:`PandasDtype` (:issue:`39357`)

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ filterwarnings =
121121
junit_family = xunit2
122122

123123
[codespell]
124-
ignore-words-list = ba,blocs,coo,hist,nd,ser
124+
ignore-words-list = ba,blocs,coo,hist,nd,sav,ser
125125
ignore-regex = https://(\w+\.)+
126126

127127
[coverage:run]

0 commit comments

Comments
 (0)