Skip to content

Commit cb6d8fd

Browse files
authored
Correct some typos in the repository (#52254)
Signed-off-by: Alexander Seiler <seileralex@gmail.com>
1 parent d86cdb0 commit cb6d8fd

27 files changed

+35
-35
lines changed

doc/source/getting_started/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ Data sets do not only contain numerical data. pandas provides a wide range of fu
533533
Coming from...
534534
--------------
535535

536-
Are you familiar with other software for manipulating tablular data? Learn
536+
Are you familiar with other software for manipulating tabular data? Learn
537537
the pandas-equivalent operations compared to software you already know:
538538

539539
.. panels::

doc/source/user_guide/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ As usual, **both sides** of the slicers are included as this is label indexing.
322322
.. warning::
323323

324324
You should specify all axes in the ``.loc`` specifier, meaning the indexer for the **index** and
325-
for the **columns**. There are some ambiguous cases where the passed indexer could be mis-interpreted
325+
for the **columns**. There are some ambiguous cases where the passed indexer could be misinterpreted
326326
  as indexing *both* axes, rather than into say the ``MultiIndex`` for the rows.
327327

328328
You should do this:

doc/source/user_guide/groupby.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ the columns except the one we specify:
149149
grouped.sum()
150150
151151
The above GroupBy will split the DataFrame on its index (rows). To split by columns, first do
152-
a tranpose:
152+
a transpose:
153153

154154
.. ipython::
155155

pandas/core/apply.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ def validate_func_kwargs(
14911491
Returns
14921492
-------
14931493
columns : List[str]
1494-
List of user-provied keys.
1494+
List of user-provided keys.
14951495
func : List[Union[str, callable[...,Any]]]
14961496
List of user-provided aggfuncs
14971497

pandas/core/config_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,13 +711,13 @@ def register_converter_cb(key) -> None:
711711
styler_max_rows = """
712712
: int, optional
713713
The maximum number of rows that will be rendered. May still be reduced to
714-
satsify ``max_elements``, which takes precedence.
714+
satisfy ``max_elements``, which takes precedence.
715715
"""
716716

717717
styler_max_columns = """
718718
: int, optional
719719
The maximum number of columns that will be rendered. May still be reduced to
720-
satsify ``max_elements``, which takes precedence.
720+
satisfy ``max_elements``, which takes precedence.
721721
"""
722722

723723
styler_precision = """

pandas/core/dtypes/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,7 @@ def pandas_dtype(dtype) -> DtypeObj:
16971697
try:
16981698
with warnings.catch_warnings():
16991699
# GH#51523 - Series.astype(np.integer) doesn't show
1700-
# numpy deprication warning of np.integer
1700+
# numpy deprecation warning of np.integer
17011701
# Hence enabling DeprecationWarning
17021702
warnings.simplefilter("always", DeprecationWarning)
17031703
npdtype = np.dtype(dtype)

pandas/core/dtypes/dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ def _parse_dtype_strict(cls, freq: str_type) -> BaseOffset:
901901
return freq_offset
902902

903903
raise TypeError(
904-
"PeriodDtype argument should be string or BaseOffet, "
904+
"PeriodDtype argument should be string or BaseOffset, "
905905
f"got {type(freq).__name__}"
906906
)
907907

pandas/core/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6559,7 +6559,7 @@ def infer_objects(self, copy: bool_t | None = None) -> Self:
65596559
Parameters
65606560
----------
65616561
copy : bool, default True
6562-
Whether to make a copy for non-object or non-inferrable columns
6562+
Whether to make a copy for non-object or non-inferable columns
65636563
or Series.
65646564
65656565
Returns

pandas/io/excel/_pyxlsb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_sheet_data(
8989
file_rows_needed: int | None = None,
9090
) -> list[list[Scalar]]:
9191
data: list[list[Scalar]] = []
92-
prevous_row_number = -1
92+
previous_row_number = -1
9393
# When sparse=True the rows can have different lengths and empty rows are
9494
# not returned. The cells are namedtuples of row, col, value (r, c, v).
9595
for row in sheet.rows(sparse=True):
@@ -99,9 +99,9 @@ def get_sheet_data(
9999
# trim trailing empty elements
100100
converted_row.pop()
101101
if converted_row:
102-
data.extend([[]] * (row_number - prevous_row_number - 1))
102+
data.extend([[]] * (row_number - previous_row_number - 1))
103103
data.append(converted_row)
104-
prevous_row_number = row_number
104+
previous_row_number = row_number
105105
if file_rows_needed is not None and len(data) >= file_rows_needed:
106106
break
107107
if data:

pandas/io/formats/format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ def _calc_max_rows_fitted(self) -> int | None:
740740
_, height = get_terminal_size()
741741
if self.max_rows == 0:
742742
# rows available to fill with actual data
743-
return height - self._get_number_of_auxillary_rows()
743+
return height - self._get_number_of_auxiliary_rows()
744744

745745
if self._is_screen_short(height):
746746
max_rows = height
@@ -775,7 +775,7 @@ def _is_screen_narrow(self, max_width) -> bool:
775775
def _is_screen_short(self, max_height) -> bool:
776776
return bool(self.max_rows == 0 and len(self.frame) > max_height)
777777

778-
def _get_number_of_auxillary_rows(self) -> int:
778+
def _get_number_of_auxiliary_rows(self) -> int:
779779
"""Get number of rows occupied by prompt, dots and dimension info."""
780780
dot_row = 1
781781
prompt_row = 1

pandas/tests/arrays/categorical/test_operators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ def test_comparisons(self, factor):
8686
cat_rev > cat_rev_base2
8787

8888
# Only categories with same ordering information can be compared
89-
cat_unorderd = cat.set_ordered(False)
89+
cat_unordered = cat.set_ordered(False)
9090
assert not (cat > cat).any()
9191

9292
with pytest.raises(TypeError, match=msg):
93-
cat > cat_unorderd
93+
cat > cat_unordered
9494

9595
# comparison (in both directions) with Series will raise
9696
s = Series(["b", "b", "b"])

pandas/tests/dtypes/test_dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def test_freq_argument_required(self):
523523
with pytest.raises(TypeError, match=msg):
524524
PeriodDtype()
525525

526-
msg = "PeriodDtype argument should be string or BaseOffet, got NoneType"
526+
msg = "PeriodDtype argument should be string or BaseOffset, got NoneType"
527527
with pytest.raises(TypeError, match=msg):
528528
# GH#51790
529529
PeriodDtype(None)

pandas/tests/frame/methods/test_isetitem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_isetitem_ea_df_scalar_indexer(self):
3838
)
3939
tm.assert_frame_equal(df, expected)
4040

41-
def test_isetitem_dimension_missmatch(self):
41+
def test_isetitem_dimension_mismatch(self):
4242
# GH#51701
4343
df = DataFrame({"a": [1, 2], "b": [3, 4], "c": [5, 6]})
4444
value = df.copy()

pandas/tests/frame/test_arithmetic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,7 @@ def test_inplace_arithmetic_series_update(using_copy_on_write):
20062006
tm.assert_frame_equal(df, expected)
20072007

20082008

2009-
def test_arithemetic_multiindex_align():
2009+
def test_arithmetic_multiindex_align():
20102010
"""
20112011
Regression test for: https://github.com/pandas-dev/pandas/issues/33765
20122012
"""

pandas/tests/frame/test_npfuncs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
class TestAsArray:
14-
def test_asarray_homogenous(self):
14+
def test_asarray_homogeneous(self):
1515
df = DataFrame({"A": Categorical([1, 2]), "B": Categorical([1, 2])})
1616
result = np.asarray(df)
1717
# may change from object in the future

pandas/tests/frame/test_unary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_invert_mixed(self):
8484
)
8585
tm.assert_frame_equal(result, expected)
8686

87-
def test_invert_empy_not_input(self):
87+
def test_invert_empty_not_input(self):
8888
# GH#51032
8989
df = pd.DataFrame()
9090
result = ~df

pandas/tests/groupby/test_filters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,12 @@ def test_filter_non_bool_raises():
603603
def test_filter_dropna_with_empty_groups():
604604
# GH 10780
605605
data = Series(np.random.rand(9), index=np.repeat([1, 2, 3], 3))
606-
groupped = data.groupby(level=0)
607-
result_false = groupped.filter(lambda x: x.mean() > 1, dropna=False)
606+
grouped = data.groupby(level=0)
607+
result_false = grouped.filter(lambda x: x.mean() > 1, dropna=False)
608608
expected_false = Series([np.nan] * 9, index=np.repeat([1, 2, 3], 3))
609609
tm.assert_series_equal(result_false, expected_false)
610610

611-
result_true = groupped.filter(lambda x: x.mean() > 1, dropna=True)
611+
result_true = grouped.filter(lambda x: x.mean() > 1, dropna=True)
612612
expected_true = Series(index=pd.Index([], dtype=int), dtype=np.float64)
613613
tm.assert_series_equal(result_true, expected_true)
614614

pandas/tests/io/json/test_readlines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def test_readjson_nrows_chunks(request, nrows, chunksize, engine):
320320

321321
def test_readjson_nrows_requires_lines(engine):
322322
# GH 33916
323-
# Test ValuError raised if nrows is set without setting lines in read_json
323+
# Test ValueError raised if nrows is set without setting lines in read_json
324324
jsonl = """{"a": 1, "b": 2}
325325
{"a": 3, "b": 4}
326326
{"a": 5, "b": 6}

pandas/tests/resample/test_resample_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,12 +983,12 @@ def test_df_axis_param_depr():
983983
index.name = "date"
984984
df = DataFrame(np.random.rand(10, 2), columns=list("AB"), index=index).T
985985

986-
# Deprication error when axis=1 is explicitly passed
986+
# Deprecation error when axis=1 is explicitly passed
987987
warning_msg = "DataFrame.resample with axis=1 is deprecated."
988988
with tm.assert_produces_warning(FutureWarning, match=warning_msg):
989989
df.resample("M", axis=1)
990990

991-
# Deprication error when axis=0 is explicitly passed
991+
# Deprecation error when axis=0 is explicitly passed
992992
df = df.T
993993
warning_msg = (
994994
"The 'axis' keyword in DataFrame.resample is deprecated and "

pandas/tests/reshape/concat/test_concat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def test_concat_mixed_objs(self):
338338
result = concat([s1, df, s2], ignore_index=True)
339339
tm.assert_frame_equal(result, expected)
340340

341-
def test_dtype_coerceion(self):
341+
def test_dtype_coercion(self):
342342
# 12411
343343
df = DataFrame({"date": [pd.Timestamp("20130101").tz_localize("UTC"), pd.NaT]})
344344

pandas/tests/scalar/timestamp/test_constructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ def test_constructor_fromisocalendar(self):
730730
assert isinstance(result, Timestamp)
731731

732732

733-
def test_constructor_ambigous_dst():
733+
def test_constructor_ambiguous_dst():
734734
# GH 24329
735735
# Make sure that calling Timestamp constructor
736736
# on Timestamp created from ambiguous time

pandas/tests/scalar/timestamp/test_unary_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
class TestTimestampUnaryOps:
3131
# --------------------------------------------------------------
32-
def test_round_divison_by_zero_raises(self):
32+
def test_round_division_by_zero_raises(self):
3333
ts = Timestamp("2016-01-01")
3434

3535
msg = "Division by zero in rounding"

pandas/tests/series/indexing/test_getitem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def test_getitem_dataframe_raises():
576576
ser[df > 5]
577577

578578

579-
def test_getitem_assignment_series_aligment():
579+
def test_getitem_assignment_series_alignment():
580580
# https://github.com/pandas-dev/pandas/issues/37427
581581
# with getitem, when assigning with a Series, it is not first aligned
582582
ser = Series(range(10))

pandas/tests/series/methods/test_sort_values.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_sort_values_ignore_index(
189189
tm.assert_series_equal(result_ser, expected)
190190
tm.assert_series_equal(ser, Series(original_list))
191191

192-
def test_mergesort_decending_stability(self):
192+
def test_mergesort_descending_stability(self):
193193
# GH 28697
194194
s = Series([1, 2, 1, 3], ["first", "b", "second", "c"])
195195
result = s.sort_values(ascending=False, kind="mergesort")

pandas/tests/series/test_constructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def test_infer_with_date_and_datetime(self):
8282
expected = Index(vals, dtype=object)
8383
tm.assert_index_equal(idx, expected)
8484

85-
def test_unparseable_strings_with_dt64_dtype(self):
85+
def test_unparsable_strings_with_dt64_dtype(self):
8686
# pre-2.0 these would be silently ignored and come back with object dtype
8787
vals = ["aa"]
8888
msg = "^Unknown datetime string format, unable to parse: aa, at position 0$"

pandas/tests/util/test_assert_index_equal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def test_index_equal_values_too_far(check_exact, rtol):
146146

147147

148148
@pytest.mark.parametrize("check_order", [True, False])
149-
def test_index_equal_value_oder_mismatch(check_exact, rtol, check_order):
149+
def test_index_equal_value_order_mismatch(check_exact, rtol, check_order):
150150
idx1 = Index([1, 2, 3])
151151
idx2 = Index([3, 2, 1])
152152

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ ignore = [
282282
"B904",
283283
# Magic number
284284
"PLR2004",
285-
# Consider `elif` instead of `else` then `if` to remove indendation level
285+
# Consider `elif` instead of `else` then `if` to remove indentation level
286286
"PLR5501",
287287
]
288288

0 commit comments

Comments
 (0)