Skip to content

Commit aa85f02

Browse files
janoshMarcoGorelli
andauthored
Fix typos (#47275)
* fix codespell violations * drop rule files: ^(pandas|doc)/ from codespell pre-commit config also fix typos fempto -> femto * improve codespell ignore-regex in setup.cfg Co-authored-by: Marco Edward Gorelli <[email protected]> Co-authored-by: Marco Edward Gorelli <[email protected]>
1 parent 11881ea commit aa85f02

File tree

18 files changed

+26
-28
lines changed

18 files changed

+26
-28
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ repos:
2626
hooks:
2727
- id: codespell
2828
types_or: [python, rst, markdown]
29-
files: ^(pandas|doc)/
3029
- repo: https://github.com/pre-commit/pre-commit-hooks
3130
rev: v4.2.0
3231
hooks:

asv_bench/benchmarks/frame_ctor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def setup(self):
3737
self.dict_list = frame.to_dict(orient="records")
3838
self.data2 = {i: {j: float(j) for j in range(100)} for i in range(2000)}
3939

40-
# arrays which we wont consolidate
40+
# arrays which we won't consolidate
4141
self.dict_of_categoricals = {i: Categorical(np.arange(N)) for i in range(K)}
4242

4343
def time_list_of_dict(self):
@@ -60,7 +60,7 @@ def time_nested_dict_int64(self):
6060
DataFrame(self.data2)
6161

6262
def time_dict_of_categoricals(self):
63-
# dict of arrays that we wont consolidate
63+
# dict of arrays that we won't consolidate
6464
DataFrame(self.dict_of_categoricals)
6565

6666

asv_bench/benchmarks/groupby.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def time_dtype_as_field(self, dtype, method, application, ncols):
527527

528528
class GroupByCythonAgg:
529529
"""
530-
Benchmarks specifically targetting our cython aggregation algorithms
530+
Benchmarks specifically targeting our cython aggregation algorithms
531531
(using a big enough dataframe with simple key, so a large part of the
532532
time is actually spent in the grouped aggregation).
533533
"""

asv_bench/benchmarks/libs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Benchmarks for code in pandas/_libs, excluding pandas/_libs/tslibs,
33
which has its own directory.
44
5-
If a PR does not edit anything in _libs/, then it is unlikely that thes
5+
If a PR does not edit anything in _libs/, then it is unlikely that the
66
benchmarks will be affected.
77
"""
88
import numpy as np

asv_bench/benchmarks/replace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def time_replace_list(self, inplace):
5050
self.df.replace([np.inf, -np.inf], np.nan, inplace=inplace)
5151

5252
def time_replace_list_one_match(self, inplace):
53-
# the 1 can be held in self._df.blocks[0], while the inf and -inf cant
53+
# the 1 can be held in self._df.blocks[0], while the inf and -inf can't
5454
self.df.replace([np.inf, -np.inf, 1], np.nan, inplace=inplace)
5555

5656

asv_bench/benchmarks/reshape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def time_stack(self, dtype):
7878
self.df.stack()
7979

8080
def time_unstack_fast(self, dtype):
81-
# last level -> doesnt have to make copies
81+
# last level -> doesn't have to make copies
8282
self.ser.unstack("bar")
8383

8484
def time_unstack_slow(self, dtype):

asv_bench/benchmarks/tslibs/period.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Period benchmarks that rely only on tslibs. See benchmarks.period for
3-
Period benchmarks that rely on other parts fo pandas.
2+
Period benchmarks that rely only on tslibs. See benchmarks.period for
3+
Period benchmarks that rely on other parts of pandas.
44
"""
55

66
import numpy as np

asv_bench/benchmarks/tslibs/timedelta.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Timedelta benchmarks that rely only on tslibs. See benchmarks.timedeltas for
3-
Timedelta benchmarks that rely on other parts fo pandas.
2+
Timedelta benchmarks that rely only on tslibs. See benchmarks.timedeltas for
3+
Timedelta benchmarks that rely on other parts of pandas.
44
"""
55
import datetime
66

doc/source/user_guide/style.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,7 @@
17621762
"cell_type": "markdown",
17631763
"metadata": {},
17641764
"source": [
1765-
"In the above case the text is blue because the selector `#T_b_ .cls-1` is worth 110 (ID plus class), which takes precendence."
1765+
"In the above case the text is blue because the selector `#T_b_ .cls-1` is worth 110 (ID plus class), which takes precedence."
17661766
]
17671767
},
17681768
{

pandas/_libs/groupby.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ cdef numeric_t _get_na_val(numeric_t val, bint is_datetimelike):
10111011
elif numeric_t is int64_t and is_datetimelike:
10121012
na_val = NPY_NAT
10131013
else:
1014-
# Will not be used, but define to avoid unitialized warning.
1014+
# Will not be used, but define to avoid uninitialized warning.
10151015
na_val = 0
10161016
return na_val
10171017

0 commit comments

Comments
 (0)