Skip to content

Commit fca241a

Browse files
bwignallmroeschke
authored andcommitted
Fix typos (#30481)
1 parent 8b7305a commit fca241a

File tree

22 files changed

+34
-34
lines changed

22 files changed

+34
-34
lines changed

doc/source/user_guide/advanced.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ When working with an ``Index`` object directly, rather than via a ``DataFrame``,
573573
.. code-block:: none
574574
575575
>>> mi.levels[0].name = 'name via level'
576-
>>> mi.names[0] # only works for older panads
576+
>>> mi.names[0] # only works for older pandas
577577
'name via level'
578578
579579
As of pandas 1.0, this will *silently* fail to update the names

doc/source/user_guide/missing_data.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ the nullable :doc:`integer <integer_na>`, boolean and
791791
:ref:`dedicated string <text.types>` data types as the missing value indicator.
792792

793793
The goal of ``pd.NA`` is provide a "missing" indicator that can be used
794-
consistently accross data types (instead of ``np.nan``, ``None`` or ``pd.NaT``
794+
consistently across data types (instead of ``np.nan``, ``None`` or ``pd.NaT``
795795
depending on the data type).
796796

797797
For example, when having missing values in a Series with the nullable integer

doc/source/user_guide/text.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ l. For ``StringDtype``, :ref:`string accessor methods<api.series.str>`
101101
2. Some string methods, like :meth:`Series.str.decode` are not available
102102
on ``StringArray`` because ``StringArray`` only holds strings, not
103103
bytes.
104-
3. In comparision operations, :class:`arrays.StringArray` and ``Series`` backed
104+
3. In comparison operations, :class:`arrays.StringArray` and ``Series`` backed
105105
by a ``StringArray`` will return an object with :class:`BooleanDtype`,
106106
rather than a ``bool`` dtype object. Missing values in a ``StringArray``
107-
will propagate in comparision operations, rather than always comparing
107+
will propagate in comparison operations, rather than always comparing
108108
unequal like :attr:`numpy.nan`.
109109

110110
Everything else that follows in the rest of this document applies equally to

doc/source/whatsnew/v1.0.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ A new ``pd.NA`` value (singleton) is introduced to represent scalar missing
111111
values. Up to now, ``np.nan`` is used for this for float data, ``np.nan`` or
112112
``None`` for object-dtype data and ``pd.NaT`` for datetime-like data. The
113113
goal of ``pd.NA`` is provide a "missing" indicator that can be used
114-
consistently accross data types. For now, the nullable integer and boolean
114+
consistently across data types. For now, the nullable integer and boolean
115115
data types and the new string data type make use of ``pd.NA`` (:issue:`28095`).
116116

117117
.. warning::
@@ -826,7 +826,7 @@ Plotting
826826
- Bug where :meth:`DataFrame.boxplot` would not accept a `color` parameter like `DataFrame.plot.box` (:issue:`26214`)
827827
- Bug in the ``xticks`` argument being ignored for :meth:`DataFrame.plot.bar` (:issue:`14119`)
828828
- :func:`set_option` now validates that the plot backend provided to ``'plotting.backend'`` implements the backend when the option is set, rather than when a plot is created (:issue:`28163`)
829-
- :meth:`DataFrame.plot` now allow a ``backend`` keyword arugment to allow changing between backends in one session (:issue:`28619`).
829+
- :meth:`DataFrame.plot` now allow a ``backend`` keyword argument to allow changing between backends in one session (:issue:`28619`).
830830
- Bug in color validation incorrectly raising for non-color styles (:issue:`29122`).
831831

832832
Groupby/resample/rolling

pandas/core/arrays/datetimelike.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ def _is_unique(self):
915915
__rdivmod__ = make_invalid_op("__rdivmod__")
916916

917917
def _add_datetimelike_scalar(self, other):
918-
# Overriden by TimedeltaArray
918+
# Overridden by TimedeltaArray
919919
raise TypeError(f"cannot add {type(self).__name__} and {type(other).__name__}")
920920

921921
_add_datetime_arraylike = _add_datetimelike_scalar
@@ -928,7 +928,7 @@ def _sub_datetimelike_scalar(self, other):
928928
_sub_datetime_arraylike = _sub_datetimelike_scalar
929929

930930
def _sub_period(self, other):
931-
# Overriden by PeriodArray
931+
# Overridden by PeriodArray
932932
raise TypeError(f"cannot subtract Period from a {type(self).__name__}")
933933

934934
def _add_offset(self, offset):
@@ -1085,7 +1085,7 @@ def _addsub_int_array(self, other, op):
10851085
-------
10861086
result : same class as self
10871087
"""
1088-
# _addsub_int_array is overriden by PeriodArray
1088+
# _addsub_int_array is overridden by PeriodArray
10891089
assert not is_period_dtype(self)
10901090
assert op in [operator.add, operator.sub]
10911091

pandas/core/groupby/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class providing the base-class of operations.
44
55
The SeriesGroupBy and DataFrameGroupBy sub-class
66
(defined in pandas.core.groupby.generic)
7-
expose these user-facing objects to provide specific functionailty.
7+
expose these user-facing objects to provide specific functionality.
88
"""
99

1010
from contextlib import contextmanager

pandas/core/indexes/interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ def get_indexer(
978978
right_indexer = self.right.get_indexer(target_as_index.right)
979979
indexer = np.where(left_indexer == right_indexer, left_indexer, -1)
980980
elif is_categorical(target_as_index):
981-
# get an indexer for unique categories then propogate to codes via take_1d
981+
# get an indexer for unique categories then propagate to codes via take_1d
982982
categories_indexer = self.get_indexer(target_as_index.categories)
983983
indexer = take_1d(categories_indexer, target_as_index.codes, fill_value=-1)
984984
elif not is_object_dtype(target_as_index):

pandas/core/internals/blocks.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ def quantile(self, qs, interpolation="linear", axis=0):
14491449
-------
14501450
Block
14511451
"""
1452-
# We should always have ndim == 2 becase Series dispatches to DataFrame
1452+
# We should always have ndim == 2 because Series dispatches to DataFrame
14531453
assert self.ndim == 2
14541454

14551455
values = self.get_values()
@@ -2432,7 +2432,7 @@ def fillna(self, value, **kwargs):
24322432
# Deprecation GH#24694, GH#19233
24332433
raise TypeError(
24342434
"Passing integers to fillna for timedelta64[ns] dtype is no "
2435-
"longer supporetd. To obtain the old behavior, pass "
2435+
"longer supported. To obtain the old behavior, pass "
24362436
"`pd.Timedelta(seconds=n)` instead."
24372437
)
24382438
return super().fillna(value, **kwargs)
@@ -2971,7 +2971,7 @@ def make_block(values, placement, klass=None, ndim=None, dtype=None):
29712971

29722972

29732973
def _extend_blocks(result, blocks=None):
2974-
""" return a new extended blocks, givin the result """
2974+
""" return a new extended blocks, given the result """
29752975
from pandas.core.internals import BlockManager
29762976

29772977
if blocks is None:

pandas/core/nanops.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ def f(x, y):
13371337

13381338
def _nanpercentile_1d(values, mask, q, na_value, interpolation):
13391339
"""
1340-
Wraper for np.percentile that skips missing values, specialized to
1340+
Wrapper for np.percentile that skips missing values, specialized to
13411341
1-dimensional case.
13421342
13431343
Parameters
@@ -1368,7 +1368,7 @@ def _nanpercentile_1d(values, mask, q, na_value, interpolation):
13681368

13691369
def nanpercentile(values, q, axis, na_value, mask, ndim, interpolation):
13701370
"""
1371-
Wraper for np.percentile that skips missing values.
1371+
Wrapper for np.percentile that skips missing values.
13721372
13731373
Parameters
13741374
----------

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ def __array__(self, dtype=None):
727727
Timestamp('2000-01-02 00:00:00+0100', tz='CET', freq='D')],
728728
dtype=object)
729729
730-
Or the values may be localized to UTC and the tzinfo discared with
730+
Or the values may be localized to UTC and the tzinfo discarded with
731731
``dtype='datetime64[ns]'``
732732
733733
>>> np.asarray(tzser, dtype="datetime64[ns]") # doctest: +ELLIPSIS

pandas/io/pytables.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3297,7 +3297,7 @@ def data_orientation(self):
32973297
def queryables(self) -> Dict[str, Any]:
32983298
""" return a dict of the kinds allowable columns for this object """
32993299

3300-
# mypy doesnt recognize DataFrame._AXIS_NAMES, so we re-write it here
3300+
# mypy doesn't recognize DataFrame._AXIS_NAMES, so we re-write it here
33013301
axis_names = {0: "index", 1: "columns"}
33023302

33033303
# compute the values_axes queryables
@@ -4993,7 +4993,7 @@ def _get_data_and_dtype_name(data: Union[np.ndarray, ABCExtensionArray]):
49934993
if data.dtype.kind in ["m", "M"]:
49944994
data = np.asarray(data.view("i8"))
49954995
# TODO: we used to reshape for the dt64tz case, but no longer
4996-
# doing that doesnt seem to break anything. why?
4996+
# doing that doesn't seem to break anything. why?
49974997

49984998
elif isinstance(data, PeriodIndex):
49994999
data = data.asi8

pandas/tests/arithmetic/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def box_df_fail(request):
248248
def box_transpose_fail(request):
249249
"""
250250
Fixture similar to `box` but testing both transpose cases for DataFrame,
251-
with the tranpose=True case xfailed.
251+
with the transpose=True case xfailed.
252252
"""
253253
# GH#23620
254254
return request.param

pandas/tests/arrays/test_integer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _check_op_integer(self, result, expected, mask, s, op_name, other):
193193
# to compare properly, we convert the expected
194194
# to float, mask to nans and convert infs
195195
# if we have uints then we process as uints
196-
# then conert to float
196+
# then convert to float
197197
# and we ultimately want to create a IntArray
198198
# for comparisons
199199

pandas/tests/indexes/datetimes/test_indexing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def test_insert(self):
457457
def test_delete(self):
458458
idx = date_range(start="2000-01-01", periods=5, freq="M", name="idx")
459459

460-
# prserve freq
460+
# preserve freq
461461
expected_0 = date_range(start="2000-02-01", periods=4, freq="M", name="idx")
462462
expected_4 = date_range(start="2000-01-01", periods=4, freq="M", name="idx")
463463

@@ -511,7 +511,7 @@ def test_delete(self):
511511
def test_delete_slice(self):
512512
idx = date_range(start="2000-01-01", periods=10, freq="D", name="idx")
513513

514-
# prserve freq
514+
# preserve freq
515515
expected_0_2 = date_range(start="2000-01-04", periods=7, freq="D", name="idx")
516516
expected_7_9 = date_range(start="2000-01-01", periods=7, freq="D", name="idx")
517517

pandas/tests/indexing/interval/test_interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_non_matching(self):
6464
s = self.s
6565

6666
# this is a departure from our current
67-
# indexin scheme, but simpler
67+
# indexing scheme, but simpler
6868
with pytest.raises(KeyError, match="^$"):
6969
s.loc[[-1, 3, 4, 5]]
7070

pandas/tests/io/formats/test_format.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def mkframe(n):
446446
assert not has_truncated_repr(df6)
447447

448448
with option_context("display.max_rows", 9, "display.max_columns", 10):
449-
# out vertical bounds can not result in exanded repr
449+
# out vertical bounds can not result in expanded repr
450450
assert not has_expanded_repr(df10)
451451
assert has_vertically_truncated_repr(df10)
452452

pandas/tests/io/pytables/test_store.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ def test_append_with_different_block_ordering(self, setup_path):
12731273
with pytest.raises(ValueError):
12741274
store.append("df", df)
12751275

1276-
# store multile additional fields in different blocks
1276+
# store multiple additional fields in different blocks
12771277
df["float_3"] = Series([1.0] * len(df), dtype="float64")
12781278
with pytest.raises(ValueError):
12791279
store.append("df", df)

pandas/tests/plotting/test_frame.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -555,14 +555,14 @@ def test_subplots_timeseries_y_axis_not_supported(self):
555555
period:
556556
since period isn't yet implemented in ``select_dtypes``
557557
and because it will need a custom value converter +
558-
tick formater (as was done for x-axis plots)
558+
tick formatter (as was done for x-axis plots)
559559
560560
categorical:
561561
because it will need a custom value converter +
562-
tick formater (also doesn't work for x-axis, as of now)
562+
tick formatter (also doesn't work for x-axis, as of now)
563563
564564
datetime_mixed_tz:
565-
because of the way how pandas handels ``Series`` of
565+
because of the way how pandas handles ``Series`` of
566566
``datetime`` objects with different timezone,
567567
generally converting ``datetime`` objects in a tz-aware
568568
form could help with this problem

pandas/tests/scalar/timedelta/test_timedelta.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_arithmetic_overflow(self):
2020
Timestamp("1700-01-01") + timedelta(days=13 * 19999)
2121

2222
def test_array_timedelta_floordiv(self):
23-
# deprected GH#19761, enforced GH#29797
23+
# deprecated GH#19761, enforced GH#29797
2424
ints = pd.date_range("2012-10-08", periods=4, freq="D").view("i8")
2525

2626
with pytest.raises(TypeError, match="Invalid dtype"):

pandas/tests/series/test_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def test_iteritems_strings(self, string_series):
310310
for idx, val in string_series.iteritems():
311311
assert val == string_series[idx]
312312

313-
# assert is lazy (genrators don't define reverse, lists do)
313+
# assert is lazy (generators don't define reverse, lists do)
314314
assert not hasattr(string_series.iteritems(), "reverse")
315315

316316
def test_items_datetimes(self, datetime_series):
@@ -321,7 +321,7 @@ def test_items_strings(self, string_series):
321321
for idx, val in string_series.items():
322322
assert val == string_series[idx]
323323

324-
# assert is lazy (genrators don't define reverse, lists do)
324+
# assert is lazy (generators don't define reverse, lists do)
325325
assert not hasattr(string_series.items(), "reverse")
326326

327327
def test_raise_on_info(self):

scripts/tests/test_validate_docstrings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ def no_type(self):
719719

720720
def no_description(self):
721721
"""
722-
Provides type but no descrption.
722+
Provides type but no description.
723723
724724
Returns
725725
-------

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def maybe_cythonize(extensions, *args, **kwargs):
510510
if hasattr(ext, "include_dirs") and numpy_incl not in ext.include_dirs:
511511
ext.include_dirs.append(numpy_incl)
512512

513-
# reuse any parallel arguments provided for compliation to cythonize
513+
# reuse any parallel arguments provided for compilation to cythonize
514514
parser = argparse.ArgumentParser()
515515
parser.add_argument("-j", type=int)
516516
parser.add_argument("--parallel", type=int)

0 commit comments

Comments
 (0)