Skip to content

Commit fa943a3

Browse files
dsaxtonKevin D Smith
authored and
Kevin D Smith
committed
CLN: Fix some spelling (pandas-dev#36644)
1 parent 62f2291 commit fa943a3

File tree

23 files changed

+34
-34
lines changed

23 files changed

+34
-34
lines changed

doc/source/development/policies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ deprecations, API compatibility, and version numbering.
1616

1717
A pandas release number is made up of ``MAJOR.MINOR.PATCH``.
1818

19-
API breaking changes should only occur in **major** releases. Theses changes
19+
API breaking changes should only occur in **major** releases. These changes
2020
will be documented, with clear guidance on what is changing, why it's changing,
2121
and how to migrate existing code to the new behavior.
2222

doc/source/user_guide/timeseries.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -282,20 +282,20 @@ You can pass only the columns that you need to assemble.
282282
Invalid data
283283
~~~~~~~~~~~~
284284

285-
The default behavior, ``errors='raise'``, is to raise when unparseable:
285+
The default behavior, ``errors='raise'``, is to raise when unparsable:
286286

287287
.. code-block:: ipython
288288
289289
In [2]: pd.to_datetime(['2009/07/31', 'asd'], errors='raise')
290290
ValueError: Unknown string format
291291
292-
Pass ``errors='ignore'`` to return the original input when unparseable:
292+
Pass ``errors='ignore'`` to return the original input when unparsable:
293293

294294
.. ipython:: python
295295
296296
pd.to_datetime(['2009/07/31', 'asd'], errors='ignore')
297297
298-
Pass ``errors='coerce'`` to convert unparseable data to ``NaT`` (not a time):
298+
Pass ``errors='coerce'`` to convert unparsable data to ``NaT`` (not a time):
299299

300300
.. ipython:: python
301301

doc/source/whatsnew/v0.17.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Highlights include:
4040
- Plotting methods are now available as attributes of the ``.plot`` accessor, see :ref:`here <whatsnew_0170.plot>`
4141
- The sorting API has been revamped to remove some long-time inconsistencies, see :ref:`here <whatsnew_0170.api_breaking.sorting>`
4242
- Support for a ``datetime64[ns]`` with timezones as a first-class dtype, see :ref:`here <whatsnew_0170.tz>`
43-
- The default for ``to_datetime`` will now be to ``raise`` when presented with unparseable formats,
43+
- The default for ``to_datetime`` will now be to ``raise`` when presented with unparsable formats,
4444
previously this would return the original input. Also, date parse
4545
functions now return consistent results. See :ref:`here <whatsnew_0170.api_breaking.to_datetime>`
4646
- The default for ``dropna`` in ``HDFStore`` has changed to ``False``, to store by default all rows even

doc/source/whatsnew/v0.20.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ Modules privacy has changed
12011201

12021202
Some formerly public python/c/c++/cython extension modules have been moved and/or renamed. These are all removed from the public API.
12031203
Furthermore, the ``pandas.core``, ``pandas.compat``, and ``pandas.util`` top-level modules are now considered to be PRIVATE.
1204-
If indicated, a deprecation warning will be issued if you reference theses modules. (:issue:`12588`)
1204+
If indicated, a deprecation warning will be issued if you reference these modules. (:issue:`12588`)
12051205

12061206
.. csv-table::
12071207
:header: "Previous Location", "New Location", "Deprecated"

doc/source/whatsnew/v0.23.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ Datetimelike API changes
998998
- Addition and subtraction of ``NaN`` from a :class:`Series` with ``dtype='timedelta64[ns]'`` will raise a ``TypeError`` instead of treating the ``NaN`` as ``NaT`` (:issue:`19274`)
999999
- ``NaT`` division with :class:`datetime.timedelta` will now return ``NaN`` instead of raising (:issue:`17876`)
10001000
- Operations between a :class:`Series` with dtype ``dtype='datetime64[ns]'`` and a :class:`PeriodIndex` will correctly raises ``TypeError`` (:issue:`18850`)
1001-
- Subtraction of :class:`Series` with timezone-aware ``dtype='datetime64[ns]'`` with mis-matched timezones will raise ``TypeError`` instead of ``ValueError`` (:issue:`18817`)
1001+
- Subtraction of :class:`Series` with timezone-aware ``dtype='datetime64[ns]'`` with mismatched timezones will raise ``TypeError`` instead of ``ValueError`` (:issue:`18817`)
10021002
- :class:`Timestamp` will no longer silently ignore unused or invalid ``tz`` or ``tzinfo`` keyword arguments (:issue:`17690`)
10031003
- :class:`Timestamp` will no longer silently ignore invalid ``freq`` arguments (:issue:`5168`)
10041004
- :class:`CacheableOffset` and :class:`WeekDay` are no longer available in the ``pandas.tseries.offsets`` module (:issue:`17830`)
@@ -1273,7 +1273,7 @@ Timedelta
12731273
- Bug in :func:`Period.asfreq` where periods near ``datetime(1, 1, 1)`` could be converted incorrectly (:issue:`19643`, :issue:`19834`)
12741274
- Bug in :func:`Timedelta.total_seconds()` causing precision errors, for example ``Timedelta('30S').total_seconds()==30.000000000000004`` (:issue:`19458`)
12751275
- Bug in :func:`Timedelta.__rmod__` where operating with a ``numpy.timedelta64`` returned a ``timedelta64`` object instead of a ``Timedelta`` (:issue:`19820`)
1276-
- Multiplication of :class:`TimedeltaIndex` by ``TimedeltaIndex`` will now raise ``TypeError`` instead of raising ``ValueError`` in cases of length mis-match (:issue:`19333`)
1276+
- Multiplication of :class:`TimedeltaIndex` by ``TimedeltaIndex`` will now raise ``TypeError`` instead of raising ``ValueError`` in cases of length mismatch (:issue:`19333`)
12771277
- Bug in indexing a :class:`TimedeltaIndex` with a ``np.timedelta64`` object which was raising a ``TypeError`` (:issue:`20393`)
12781278

12791279

doc/source/whatsnew/v0.24.0.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ Other enhancements
419419
- :meth:`Index.difference`, :meth:`Index.intersection`, :meth:`Index.union`, and :meth:`Index.symmetric_difference` now have an optional ``sort`` parameter to control whether the results should be sorted if possible (:issue:`17839`, :issue:`24471`)
420420
- :meth:`read_excel()` now accepts ``usecols`` as a list of column names or callable (:issue:`18273`)
421421
- :meth:`MultiIndex.to_flat_index` has been added to flatten multiple levels into a single-level :class:`Index` object.
422-
- :meth:`DataFrame.to_stata` and :class:`pandas.io.stata.StataWriter117` can write mixed sting columns to Stata strl format (:issue:`23633`)
422+
- :meth:`DataFrame.to_stata` and :class:`pandas.io.stata.StataWriter117` can write mixed string columns to Stata strl format (:issue:`23633`)
423423
- :meth:`DataFrame.between_time` and :meth:`DataFrame.at_time` have gained the ``axis`` parameter (:issue:`8839`)
424424
- :meth:`DataFrame.to_records` now accepts ``index_dtypes`` and ``column_dtypes`` parameters to allow different data types in stored column and index records (:issue:`18146`)
425425
- :class:`IntervalIndex` has gained the :attr:`~IntervalIndex.is_overlapping` attribute to indicate if the ``IntervalIndex`` contains any overlapping intervals (:issue:`23309`)
@@ -510,7 +510,7 @@ even when ``'\n'`` was passed in ``line_terminator``.
510510
511511
*New behavior* on Windows:
512512

513-
Passing ``line_terminator`` explicitly, set thes ``line terminator`` to that character.
513+
Passing ``line_terminator`` explicitly, set the ``line terminator`` to that character.
514514

515515
.. code-block:: ipython
516516
@@ -1885,7 +1885,7 @@ Reshaping
18851885
- :meth:`DataFrame.nlargest` and :meth:`DataFrame.nsmallest` now returns the correct n values when keep != 'all' also when tied on the first columns (:issue:`22752`)
18861886
- Constructing a DataFrame with an index argument that wasn't already an instance of :class:`~pandas.core.Index` was broken (:issue:`22227`).
18871887
- Bug in :class:`DataFrame` prevented list subclasses to be used to construction (:issue:`21226`)
1888-
- Bug in :func:`DataFrame.unstack` and :func:`DataFrame.pivot_table` returning a missleading error message when the resulting DataFrame has more elements than int32 can handle. Now, the error message is improved, pointing towards the actual problem (:issue:`20601`)
1888+
- Bug in :func:`DataFrame.unstack` and :func:`DataFrame.pivot_table` returning a misleading error message when the resulting DataFrame has more elements than int32 can handle. Now, the error message is improved, pointing towards the actual problem (:issue:`20601`)
18891889
- Bug in :func:`DataFrame.unstack` where a ``ValueError`` was raised when unstacking timezone aware values (:issue:`18338`)
18901890
- Bug in :func:`DataFrame.stack` where timezone aware values were converted to timezone naive values (:issue:`19420`)
18911891
- Bug in :func:`merge_asof` where a ``TypeError`` was raised when ``by_col`` were timezone aware values (:issue:`21184`)

doc/source/whatsnew/v1.2.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ I/O
325325
- :meth:`to_csv` did not support zip compression for binary file object not having a filename (:issue:`35058`)
326326
- :meth:`to_csv` and :meth:`read_csv` did not honor ``compression`` and ``encoding`` for path-like objects that are internally converted to file-like objects (:issue:`35677`, :issue:`26124`, and :issue:`32392`)
327327
- :meth:`to_picke` and :meth:`read_pickle` did not support compression for file-objects (:issue:`26237`, :issue:`29054`, and :issue:`29570`)
328-
- Bug in :func:`LongTableBuilder.middle_separator` was duplicating LaTeX longtable entires in the List of Tables of a LaTeX document (:issue:`34360`)
328+
- Bug in :func:`LongTableBuilder.middle_separator` was duplicating LaTeX longtable entries in the List of Tables of a LaTeX document (:issue:`34360`)
329329
- Bug in :meth:`read_csv` with ``engine='python'`` truncating data if multiple items present in first row and first element started with BOM (:issue:`36343`)
330330
- Removed ``private_key`` and ``verbose`` from :func:`read_gbq` as they are no longer supported in ``pandas-gbq`` (:issue:`34654`, :issue:`30200`)
331331

pandas/core/aggregation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def validate_func_kwargs(
377377
(['one', 'two'], ['min', 'max'])
378378
"""
379379
no_arg_message = "Must provide 'func' or named aggregation **kwargs."
380-
tuple_given_message = "func is expected but recieved {} in **kwargs."
380+
tuple_given_message = "func is expected but received {} in **kwargs."
381381
columns = list(kwargs)
382382
func = []
383383
for col_func in kwargs.values():

pandas/core/arrays/datetimelike.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def _unbox_scalar(self, value: DTScalarOrNaT, setitem: bool = False) -> int:
168168
value : Period, Timestamp, Timedelta, or NaT
169169
Depending on subclass.
170170
setitem : bool, default False
171-
Whether to check compatiblity with setitem strictness.
171+
Whether to check compatibility with setitem strictness.
172172
173173
Returns
174174
-------
@@ -1123,7 +1123,7 @@ def _sub_period(self, other):
11231123
raise TypeError(f"cannot subtract Period from a {type(self).__name__}")
11241124

11251125
def _add_period(self, other: Period):
1126-
# Overriden by TimedeltaArray
1126+
# Overridden by TimedeltaArray
11271127
raise TypeError(f"cannot add Period to a {type(self).__name__}")
11281128

11291129
def _add_offset(self, offset):

pandas/core/arrays/sparse/array.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ def _concat_same_type(cls, to_concat):
986986
# get an identical index as concating the values and then
987987
# creating a new index. We don't want to spend the time trying
988988
# to merge blocks across arrays in `to_concat`, so the resulting
989-
# BlockIndex may have more blocs.
989+
# BlockIndex may have more blocks.
990990
blengths = []
991991
blocs = []
992992

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5133,7 +5133,7 @@ def drop_duplicates(
51335133
0 Yum Yum cup 4.0
51345134
2 Indomie cup 3.5
51355135
5136-
To remove duplicates and keep last occurences, use ``keep``.
5136+
To remove duplicates and keep last occurrences, use ``keep``.
51375137
51385138
>>> df.drop_duplicates(subset=['brand', 'style'], keep='last')
51395139
brand style rating

pandas/core/generic.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3406,7 +3406,7 @@ def _maybe_update_cacher(
34063406
if cacher is not None:
34073407
ref = cacher[1]()
34083408

3409-
# we are trying to reference a dead referant, hence
3409+
# we are trying to reference a dead referent, hence
34103410
# a copy
34113411
if ref is None:
34123412
del self._cacher
@@ -3420,7 +3420,7 @@ def _maybe_update_cacher(
34203420
ref._item_cache.pop(cacher[0], None)
34213421

34223422
if verify_is_copy:
3423-
self._check_setitem_copy(stacklevel=5, t="referant")
3423+
self._check_setitem_copy(stacklevel=5, t="referent")
34243424

34253425
if clear:
34263426
self._clear_item_cache()
@@ -3781,10 +3781,10 @@ def _check_is_chained_assignment_possible(self) -> bool_t:
37813781
if self._is_view and self._is_cached:
37823782
ref = self._get_cacher()
37833783
if ref is not None and ref._is_mixed_type:
3784-
self._check_setitem_copy(stacklevel=4, t="referant", force=True)
3784+
self._check_setitem_copy(stacklevel=4, t="referent", force=True)
37853785
return True
37863786
elif self._is_copy:
3787-
self._check_setitem_copy(stacklevel=4, t="referant")
3787+
self._check_setitem_copy(stacklevel=4, t="referent")
37883788
return False
37893789

37903790
def _check_setitem_copy(self, stacklevel=4, t="setting", force=False):
@@ -3837,7 +3837,7 @@ def _check_setitem_copy(self, stacklevel=4, t="setting", force=False):
38373837
if isinstance(self._is_copy, str):
38383838
t = self._is_copy
38393839

3840-
elif t == "referant":
3840+
elif t == "referent":
38413841
t = (
38423842
"\n"
38433843
"A value is trying to be set on a copy of a slice from a "

pandas/core/groupby/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ def _choose_path(self, fast_path: Callable, slow_path: Callable, group: DataFram
14301430
except AssertionError:
14311431
raise
14321432
except Exception:
1433-
# GH#29631 For user-defined function, we cant predict what may be
1433+
# GH#29631 For user-defined function, we can't predict what may be
14341434
# raised; see test_transform.test_transform_fastpath_raises
14351435
return path, res
14361436

pandas/core/indexers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def check_setitem_lengths(indexer, value, values) -> bool:
144144
no_op = False
145145

146146
if isinstance(indexer, (np.ndarray, list)):
147-
# We can ignore other listlikes becasue they are either
147+
# We can ignore other listlikes because they are either
148148
# a) not necessarily 1-D indexers, e.g. tuple
149149
# b) boolean indexers e.g. BoolArray
150150
if is_list_like(value):

pandas/core/indexes/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4503,7 +4503,7 @@ def sort_values(
45034503
idx = ensure_key_mapped(self, key)
45044504

45054505
# GH 35584. Sort missing values according to na_position kwarg
4506-
# ignore na_position for MutiIndex
4506+
# ignore na_position for MultiIndex
45074507
if not isinstance(
45084508
self, (ABCMultiIndex, ABCDatetimeIndex, ABCTimedeltaIndex, ABCPeriodIndex)
45094509
):

pandas/core/indexes/interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ def intersection(
10231023
def _intersection_unique(self, other: "IntervalIndex") -> "IntervalIndex":
10241024
"""
10251025
Used when the IntervalIndex does not have any common endpoint,
1026-
no mater left or right.
1026+
no matter left or right.
10271027
Return the intersection with another IntervalIndex.
10281028
10291029
Parameters

pandas/core/internals/managers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def set_axis(self, axis: int, new_labels: Index) -> None:
225225

226226
@property
227227
def _is_single_block(self) -> bool:
228-
# Assumes we are 2D; overriden by SingleBlockManager
228+
# Assumes we are 2D; overridden by SingleBlockManager
229229
return len(self.blocks) == 1
230230

231231
def _rebuild_blknos_and_blklocs(self) -> None:

pandas/core/strings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ def str_pad(arr, width, side="left", fillchar=" "):
14701470
character. Equivalent to ``Series.str.pad(side='left')``.
14711471
Series.str.ljust : Fills the right side of strings with an arbitrary
14721472
character. Equivalent to ``Series.str.pad(side='right')``.
1473-
Series.str.center : Fills boths sides of strings with an arbitrary
1473+
Series.str.center : Fills both sides of strings with an arbitrary
14741474
character. Equivalent to ``Series.str.pad(side='both')``.
14751475
Series.str.zfill : Pad strings in the Series/Index by prepending '0'
14761476
character. Equivalent to ``Series.str.pad(side='left', fillchar='0')``.
@@ -2918,7 +2918,7 @@ def zfill(self, width):
29182918
character.
29192919
Series.str.pad : Fills the specified sides of strings with an arbitrary
29202920
character.
2921-
Series.str.center : Fills boths sides of strings with an arbitrary
2921+
Series.str.center : Fills both sides of strings with an arbitrary
29222922
character.
29232923
29242924
Notes

pandas/errors/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class DuplicateLabelError(ValueError):
225225

226226
class InvalidIndexError(Exception):
227227
"""
228-
Exception raised when attemping to use an invalid index key.
228+
Exception raised when attempting to use an invalid index key.
229229
230230
.. versionadded:: 1.1.0
231231
"""

pandas/io/parsers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
result 'foo'
228228
229229
If a column or index cannot be represented as an array of datetimes,
230-
say because of an unparseable value or a mixture of timezones, the column
230+
say because of an unparsable value or a mixture of timezones, the column
231231
or index will be returned unaltered as an object data type. For
232232
non-standard datetime parsing, use ``pd.to_datetime`` after
233233
``pd.read_csv``. To parse an index or column with a mixture of timezones,

pandas/io/stata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ class CategoricalConversionWarning(Warning):
499499
dataset with an iterator results in categorical variable with different
500500
categories. This occurs since it is not possible to know all possible values
501501
until the entire dataset has been read. To avoid this warning, you can either
502-
read dataset without an interator, or manually convert categorical data by
502+
read dataset without an iterator, or manually convert categorical data by
503503
``convert_categoricals`` to False and then accessing the variable labels
504504
through the value_labels method of the reader.
505505
"""

pandas/plotting/_misc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def bootstrap_plot(series, fig=None, size=50, samples=500, **kwds):
318318
319319
Examples
320320
--------
321-
This example draws a basic bootstap plot for a Series.
321+
This example draws a basic bootstrap plot for a Series.
322322
323323
.. plot::
324324
:context: close-figs

pandas/tests/groupby/aggregate/test_aggregate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ def test_mangled(self):
564564
def test_named_agg_nametuple(self, inp):
565565
# GH34422
566566
s = pd.Series([1, 1, 2, 2, 3, 3, 4, 5])
567-
msg = f"func is expected but recieved {type(inp).__name__}"
567+
msg = f"func is expected but received {type(inp).__name__}"
568568
with pytest.raises(TypeError, match=msg):
569569
s.groupby(s.values).agg(a=inp)
570570

0 commit comments

Comments
 (0)