Skip to content

Commit a72fa1b

Browse files
authored
CLN/DOC: typos (#46328)
* fix typos * fix typo * fix typo * fix typo
1 parent 17dda44 commit a72fa1b

File tree

19 files changed

+22
-22
lines changed

19 files changed

+22
-22
lines changed

pandas/_libs/hashtable_func_helper.pxi.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ cdef ismember_{{dtype}}(const {{dtype}}_t[:] arr, const {{dtype}}_t[:] values):
190190

191191
Returns
192192
-------
193-
boolean ndarry len of (arr)
193+
boolean ndarray len of (arr)
194194
"""
195195
cdef:
196196
Py_ssize_t i, n

pandas/_libs/index.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ cdef class ExtensionEngine(SharedEngine):
10661066
try:
10671067
return self.values == val
10681068
except TypeError:
1069-
# e.g. if __eq__ returns a BooleanArray instead of ndarry[bool]
1069+
# e.g. if __eq__ returns a BooleanArray instead of ndarray[bool]
10701070
try:
10711071
return (self.values == val).to_numpy(dtype=bool, na_value=False)
10721072
except (TypeError, AttributeError) as err:

pandas/core/arrays/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ def _reduce(self, name: str, *, skipna: bool = True, **kwargs):
14011401

14021402
# ------------------------------------------------------------------------
14031403
# Non-Optimized Default Methods; in the case of the private methods here,
1404-
# these are not guaranteeed to be stable across pandas versions.
1404+
# these are not guaranteed to be stable across pandas versions.
14051405

14061406
def tolist(self) -> list:
14071407
"""

pandas/core/indexes/multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2311,7 +2311,7 @@ def swaplevel(self, i=-2, j=-1) -> MultiIndex:
23112311
See Also
23122312
--------
23132313
Series.swaplevel : Swap levels i and j in a MultiIndex.
2314-
Dataframe.swaplevel : Swap levels i and j in a MultiIndex on a
2314+
DataFrame.swaplevel : Swap levels i and j in a MultiIndex on a
23152315
particular axis.
23162316
23172317
Examples

pandas/io/formats/style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3423,7 +3423,7 @@ def highlight_between(
34233423
34243424
.. figure:: ../../_static/style/hbetw_basic.png
34253425
3426-
Using a range input sequnce along an ``axis``, in this case setting a ``left``
3426+
Using a range input sequence along an ``axis``, in this case setting a ``left``
34273427
and ``right`` for each column individually
34283428
34293429
>>> df.style.highlight_between(left=[1.4, 2.4, 3.4], right=[1.6, 2.6, 3.6],

pandas/io/formats/style_render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def _generate_col_header_row(self, iter: tuple, max_cols: int, col_lengths: dict
436436
Looping variables from outer scope
437437
max_cols : int
438438
Permissible number of columns
439-
col_lenths :
439+
col_lengths :
440440
c
441441
442442
Returns

pandas/io/formats/xml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BaseXMLFormatter:
6262
elem_cols : list
6363
List of columns to write as children in row element.
6464
65-
namespacess : dict
65+
namespaces : dict
6666
The namespaces to define in XML document as dicts with key
6767
being namespace and value the URI.
6868
@@ -485,9 +485,9 @@ def build_tree(self) -> bytes:
485485

486486
def convert_empty_str_key(self) -> None:
487487
"""
488-
Replace zero-lengh string in `namespaces`.
488+
Replace zero-length string in `namespaces`.
489489
490-
This method will replce '' with None to align to `lxml`
490+
This method will replace '' with None to align to `lxml`
491491
requirement that empty string prefixes are not allowed.
492492
"""
493493

pandas/io/xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class _XMLFrameParser:
6060
The XPath expression to parse required set of nodes for
6161
migration to `Data Frame`. `etree` supports limited XPath.
6262
63-
namespacess : dict
63+
namespaces : dict
6464
The namespaces defined in XML document (`xmlns:namespace='URI')
6565
as dicts with key being namespace and value the URI.
6666

pandas/tests/arithmetic/test_datetime64.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,7 @@ def test_dti_add_tdi(self, tz_naive_fixture):
20182018
expected = date_range("2017-01-01", periods=10, tz=tz)
20192019
expected = expected._with_freq(None)
20202020

2021-
# add with TimdeltaIndex
2021+
# add with TimedeltaIndex
20222022
result = dti + tdi
20232023
tm.assert_index_equal(result, expected)
20242024

@@ -2040,7 +2040,7 @@ def test_dti_iadd_tdi(self, tz_naive_fixture):
20402040
expected = date_range("2017-01-01", periods=10, tz=tz)
20412041
expected = expected._with_freq(None)
20422042

2043-
# iadd with TimdeltaIndex
2043+
# iadd with TimedeltaIndex
20442044
result = DatetimeIndex([Timestamp("2017-01-01", tz=tz)] * 10)
20452045
result += tdi
20462046
tm.assert_index_equal(result, expected)

pandas/tests/arrays/masked_shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_ufunc_with_out(self, dtype):
127127
assert isinstance(result, np.ndarray)
128128
assert result.all()
129129

130-
# result |= mask worked because mask could be cast lossslessly to
130+
# result |= mask worked because mask could be cast losslessly to
131131
# boolean ndarray. mask2 can't, so this raises
132132
result = np.zeros(3, dtype=bool)
133133
msg = "Specify an appropriate 'na_value' for this dtype"

pandas/tests/groupby/test_allowlist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def test_all_methods_categorized(mframe):
419419
# new public method?
420420
if new_names:
421421
msg = f"""
422-
There are uncatgeorized methods defined on the Grouper class:
422+
There are uncategorized methods defined on the Grouper class:
423423
{new_names}.
424424
425425
Was a new method recently added?

pandas/tests/groupby/test_categorical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ def test_groupby_agg_non_numeric():
15241524

15251525

15261526
@pytest.mark.parametrize("func", ["first", "last"])
1527-
def test_groupy_first_returned_categorical_instead_of_dataframe(func):
1527+
def test_groupby_first_returned_categorical_instead_of_dataframe(func):
15281528
# GH 28641: groupby drops index, when grouping over categorical column with
15291529
# first/last. Renamed Categorical instead of DataFrame previously.
15301530
df = DataFrame({"A": [1997], "B": Series(["b"], dtype="category").cat.as_ordered()})

pandas/tests/groupby/test_indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_against_head_and_tail(arg, method, simulated):
221221
@pytest.mark.parametrize("stop", [None, 0, 1, 10, -1, -10])
222222
@pytest.mark.parametrize("step", [None, 1, 5])
223223
def test_against_df_iloc(start, stop, step):
224-
# Test that a single group gives the same results as DataFame.iloc
224+
# Test that a single group gives the same results as DataFrame.iloc
225225
n_rows = 30
226226

227227
data = {

pandas/tests/groupby/test_nth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def test_first_categorical_and_datetime_data_nat():
665665
tm.assert_frame_equal(result, expected)
666666

667667

668-
def test_first_multi_key_groupbby_categorical():
668+
def test_first_multi_key_groupby_categorical():
669669
# GH 22512
670670
df = DataFrame(
671671
{

pandas/tests/indexes/categorical/test_reindex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_reindex_list_non_unique(self):
1919
tm.assert_index_equal(res, Index(["a", "a", "c"]), exact=True)
2020
tm.assert_numpy_array_equal(indexer, np.array([0, 3, 2], dtype=np.intp))
2121

22-
def test_reindex_categorcal_non_unique(self):
22+
def test_reindex_categorical_non_unique(self):
2323
ci = CategoricalIndex(["a", "b", "c", "a"])
2424
with tm.assert_produces_warning(FutureWarning, match="non-unique"):
2525
res, indexer = ci.reindex(Categorical(["a", "c"]))

pandas/tests/indexes/numeric/test_numeric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def test_equals_numeric_other_index_type(self, other):
205205
def test_lookups_datetimelike_values(self, vals, dtype):
206206

207207
# If we have datetime64 or timedelta64 values, make sure they are
208-
# wrappped correctly GH#31163
208+
# wrapped correctly GH#31163
209209
ser = Series(vals, index=range(3, 6))
210210
ser.index = ser.index.astype(dtype)
211211

pandas/tests/io/formats/test_to_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_to_csv_with_single_column(self):
4646
with open(path) as f:
4747
assert f.read() == expected2
4848

49-
def test_to_csv_defualt_encoding(self):
49+
def test_to_csv_default_encoding(self):
5050
# GH17097
5151
df = DataFrame({"col": ["AAAAA", "ÄÄÄÄÄ", "ßßßßß", "聞聞聞聞聞"]})
5252

pandas/tests/scalar/interval/test_arithmetic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_numeric_interval_add_timedelta_raises(interval, delta):
5252

5353

5454
@pytest.mark.parametrize("klass", [timedelta, np.timedelta64, Timedelta])
55-
def test_timdelta_add_timestamp_interval(klass):
55+
def test_timedelta_add_timestamp_interval(klass):
5656
delta = klass(0)
5757
expected = Interval(Timestamp("2020-01-01"), Timestamp("2020-02-01"))
5858

pandas/tests/scalar/period/test_period.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ def _period_constructor(bound, offset):
836836

837837
@pytest.mark.parametrize("bound, offset", [(Timestamp.min, -1), (Timestamp.max, 1)])
838838
@pytest.mark.parametrize("period_property", ["start_time", "end_time"])
839-
def test_outter_bounds_start_and_end_time(self, bound, offset, period_property):
839+
def test_outer_bounds_start_and_end_time(self, bound, offset, period_property):
840840
# GH #13346
841841
period = TestPeriodProperties._period_constructor(bound, offset)
842842
with pytest.raises(OutOfBoundsDatetime, match="Out of bounds nanosecond"):

0 commit comments

Comments
 (0)