Skip to content

Commit c5631bb

Browse files
luzpazharisbal
authored and
harisbal
committed
DOC: misc. typos (pandas-dev#19876)
Found via `codespell -q 3 -I ../pandas-whitelist.txt` Where whitelists consists of: ``` ans behaviour doubleclick indicies initialise initialised initialising nd resetted splitted thru valu ```
1 parent 5c41b2d commit c5631bb

File tree

15 files changed

+21
-21
lines changed

15 files changed

+21
-21
lines changed

doc/source/basics.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2312,4 +2312,4 @@ All NumPy dtypes are subclasses of ``numpy.generic``:
23122312
.. note::
23132313

23142314
Pandas also defines the types ``category``, and ``datetime64[ns, tz]``, which are not integrated into the normal
2315-
NumPy hierarchy and wont show up with the above function.
2315+
NumPy hierarchy and won't show up with the above function.

doc/source/dsintro.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ To write code compatible with all versions of Python, split the assignment in tw
539539
you'll need to take care when passing ``assign`` expressions that
540540

541541
* Updating an existing column
542-
* Refering to the newly updated column in the same ``assign``
542+
* Referring to the newly updated column in the same ``assign``
543543

544544
For example, we'll update column "A" and then refer to it when creating "B".
545545

doc/source/whatsnew/v0.14.1.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Performance
145145
~~~~~~~~~~~
146146
- Improvements in dtype inference for numeric operations involving yielding performance gains for dtypes: ``int64``, ``timedelta64``, ``datetime64`` (:issue:`7223`)
147147
- Improvements in Series.transform for significant performance gains (:issue:`6496`)
148-
- Improvements in DataFrame.transform with ufuncs and built-in grouper functions for signifcant performance gains (:issue:`7383`)
148+
- Improvements in DataFrame.transform with ufuncs and built-in grouper functions for significant performance gains (:issue:`7383`)
149149
- Regression in groupby aggregation of datetime64 dtypes (:issue:`7555`)
150150
- Improvements in `MultiIndex.from_product` for large iterables (:issue:`7627`)
151151

pandas/_libs/groupby_helper.pxi.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def group_rank_{{name}}(ndarray[float64_t, ndim=2] out,
426426
labels : array containing unique label for each group, with its ordering
427427
matching up to the corresponding record in `values`
428428
is_datetimelike : bool
429-
unused in this method but provided for call compatability with other
429+
unused in this method but provided for call compatibility with other
430430
Cython transformations
431431
ties_method : {'keep', 'top', 'bottom'}
432432
* keep: leave NA values where they are

pandas/core/arrays/categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def _from_inferred_categories(cls, inferred_categories, inferred_codes,
521521
cats = to_timedelta(inferred_categories, errors='coerce')
522522

523523
if known_categories:
524-
# recode from observation oder to dtype.categories order
524+
# recode from observation order to dtype.categories order
525525
categories = dtype.categories
526526
codes = _recode_for_categories(inferred_codes, cats, categories)
527527
elif not cats.is_monotonic_increasing:

pandas/core/internals.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2600,12 +2600,12 @@ def __init__(self, values, placement, ndim=None):
26002600

26012601
def _maybe_coerce_values(self, values):
26022602
"""Input validation for values passed to __init__. Ensure that
2603-
we have datetime64ns, coercing if nescessary.
2603+
we have datetime64ns, coercing if necessary.
26042604
26052605
Parametetrs
26062606
-----------
26072607
values : array-like
2608-
Must be convertable to datetime64
2608+
Must be convertible to datetime64
26092609
26102610
Returns
26112611
-------
@@ -2760,12 +2760,12 @@ def __init__(self, values, placement, ndim=2, dtype=None):
27602760

27612761
def _maybe_coerce_values(self, values, dtype=None):
27622762
"""Input validation for values passed to __init__. Ensure that
2763-
we have datetime64TZ, coercing if nescessary.
2763+
we have datetime64TZ, coercing if necessary.
27642764
27652765
Parametetrs
27662766
-----------
27672767
values : array-like
2768-
Must be convertable to datetime64
2768+
Must be convertible to datetime64
27692769
dtype : string or DatetimeTZDtype, optional
27702770
Does a shallow copy to this tz
27712771

pandas/plotting/_converter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def __call__(self, x, pos=0):
197197
----------
198198
x : float
199199
The time of day specified as seconds since 00:00 (midnight),
200-
with upto microsecond precision.
200+
with up to microsecond precision.
201201
pos
202202
Unused
203203

pandas/tests/extension/category/test_categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_align_frame(self, data, na_value):
6060

6161

6262
class TestGetitem(base.BaseGetitemTests):
63-
@pytest.mark.skip(reason="Backwards compatability")
63+
@pytest.mark.skip(reason="Backwards compatibility")
6464
def test_getitem_scalar(self):
6565
# CategoricalDtype.type isn't "correct" since it should
6666
# be a parent of the elements (object). But don't want

pandas/tests/extension/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def na_cmp():
3737
Should return a function of two arguments that returns
3838
True if both arguments are (scalar) NA for your type.
3939
40-
By defult, uses ``operator.or``
40+
By default, uses ``operator.or``
4141
"""
4242
return operator.is_
4343

pandas/tests/frame/test_mutate_columns.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_assign_bad(self):
9595
def test_assign_dependent_old_python(self):
9696
df = DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
9797

98-
# Key C does not exist at defition time of df
98+
# Key C does not exist at definition time of df
9999
with pytest.raises(KeyError):
100100
df.assign(C=lambda df: df.A,
101101
D=lambda df: df['A'] + df['C'])

pandas/tests/frame/test_repr_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def test_info_memory_usage(self):
307307
res = buf.getvalue().splitlines()
308308
assert "memory usage: " in res[-1]
309309

310-
# do not display memory usage cas
310+
# do not display memory usage case
311311
df.info(buf=buf, memory_usage=False)
312312
res = buf.getvalue().splitlines()
313313
assert "memory usage: " not in res[-1]

pandas/tests/io/test_excel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ def roundtrip(df, header=True, parser_hdr=0, index=True):
17861786
nrows = 5
17871787
ncols = 3
17881788
for use_headers in (True, False):
1789-
for i in range(1, 4): # row multindex upto nlevel=3
1789+
for i in range(1, 4): # row multindex up to nlevel=3
17901790
for j in range(1, 4): # col ""
17911791
df = mkdf(nrows, ncols, r_idx_nlevels=i, c_idx_nlevels=j)
17921792

pandas/tests/io/test_stata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def test_read_write_dta10(self):
336336
with tm.ensure_clean() as path:
337337
original.to_stata(path, {'datetime': 'tc'})
338338
written_and_read_again = self.read_dta(path)
339-
# original.index is np.int32, readed index is np.int64
339+
# original.index is np.int32, read index is np.int64
340340
tm.assert_frame_equal(written_and_read_again.set_index('index'),
341341
original, check_index_type=False)
342342

pandas/tests/reshape/test_concat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_concat_categorical(self):
473473
tm.assert_series_equal(pd.concat([s1, s2], ignore_index=True), exp)
474474
tm.assert_series_equal(s1.append(s2, ignore_index=True), exp)
475475

476-
# completelly different categories (same dtype) => not-category
476+
# completely different categories (same dtype) => not-category
477477
s1 = pd.Series([10, 11, np.nan], dtype='category')
478478
s2 = pd.Series([np.nan, 1, 3, 2], dtype='category')
479479

@@ -518,7 +518,7 @@ def test_concat_categorical_coercion(self):
518518
tm.assert_series_equal(pd.concat([s2, s1], ignore_index=True), exp)
519519
tm.assert_series_equal(s2.append(s1, ignore_index=True), exp)
520520

521-
# completelly different categories => not-category
521+
# completely different categories => not-category
522522
s1 = pd.Series([10, 11, np.nan], dtype='category')
523523
s2 = pd.Series([1, 3, 2])
524524

pandas/tests/sparse/frame/test_frame.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ def test_constructor_preserve_attr(self):
247247
def test_constructor_nan_dataframe(self):
248248
# GH 10079
249249
trains = np.arange(100)
250-
tresholds = [10, 20, 30, 40, 50, 60]
251-
tuples = [(i, j) for i in trains for j in tresholds]
250+
thresholds = [10, 20, 30, 40, 50, 60]
251+
tuples = [(i, j) for i in trains for j in thresholds]
252252
index = pd.MultiIndex.from_tuples(tuples,
253-
names=['trains', 'tresholds'])
253+
names=['trains', 'thresholds'])
254254
matrix = np.empty((len(index), len(trains)))
255255
matrix.fill(np.nan)
256256
df = pd.DataFrame(matrix, index=index, columns=trains, dtype=float)

0 commit comments

Comments
 (0)