Skip to content

Commit f483321

Browse files
luzpazjreback
authored andcommitted
Misc typos (pandas-dev#19430)
Found via `codespell -q 3`
1 parent ad468e9 commit f483321

File tree

22 files changed

+34
-34
lines changed

22 files changed

+34
-34
lines changed

asv_bench/benchmarks/replace.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ class Convert(object):
4444

4545
goal_time = 0.5
4646
params = (['DataFrame', 'Series'], ['Timestamp', 'Timedelta'])
47-
param_names = ['contructor', 'replace_data']
47+
param_names = ['constructor', 'replace_data']
4848

49-
def setup(self, contructor, replace_data):
49+
def setup(self, constructor, replace_data):
5050
N = 10**3
5151
data = {'Series': pd.Series(np.random.randint(N, size=N)),
5252
'DataFrame': pd.DataFrame({'A': np.random.randint(N, size=N),
5353
'B': np.random.randint(N, size=N)})}
5454
self.to_replace = {i: getattr(pd, replace_data) for i in range(N)}
55-
self.data = data[contructor]
55+
self.data = data[constructor]
5656

57-
def time_replace(self, contructor, replace_data):
57+
def time_replace(self, constructor, replace_data):
5858
self.data.replace(self.to_replace)

asv_bench/benchmarks/rolling.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ class Methods(object):
1212
['int', 'float'],
1313
['median', 'mean', 'max', 'min', 'std', 'count', 'skew', 'kurt',
1414
'sum', 'corr', 'cov'])
15-
param_names = ['contructor', 'window', 'dtype', 'method']
15+
param_names = ['constructor', 'window', 'dtype', 'method']
1616

17-
def setup(self, contructor, window, dtype, method):
17+
def setup(self, constructor, window, dtype, method):
1818
N = 10**5
1919
arr = np.random.random(N).astype(dtype)
20-
self.roll = getattr(pd, contructor)(arr).rolling(window)
20+
self.roll = getattr(pd, constructor)(arr).rolling(window)
2121

22-
def time_rolling(self, contructor, window, dtype, method):
22+
def time_rolling(self, constructor, window, dtype, method):
2323
getattr(self.roll, method)()
2424

2525

@@ -30,12 +30,12 @@ class Quantile(object):
3030
[10, 1000],
3131
['int', 'float'],
3232
[0, 0.5, 1])
33-
param_names = ['contructor', 'window', 'dtype', 'percentile']
33+
param_names = ['constructor', 'window', 'dtype', 'percentile']
3434

35-
def setup(self, contructor, window, dtype, percentile):
35+
def setup(self, constructor, window, dtype, percentile):
3636
N = 10**5
3737
arr = np.random.random(N).astype(dtype)
38-
self.roll = getattr(pd, contructor)(arr).rolling(window)
38+
self.roll = getattr(pd, constructor)(arr).rolling(window)
3939

40-
def time_quantile(self, contructor, window, dtype, percentile):
40+
def time_quantile(self, constructor, window, dtype, percentile):
4141
self.roll.quantile(percentile)

doc/source/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2500,7 +2500,7 @@ Scalar introspection
25002500
Extensions
25012501
----------
25022502

2503-
These are primarily intented for library authors looking to extend pandas
2503+
These are primarily intended for library authors looking to extend pandas
25042504
objects.
25052505

25062506
.. currentmodule:: pandas

doc/source/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,7 @@ file, and the ``sheet_name`` indicating which sheet to parse.
26752675
+++++++++++++++++++
26762676

26772677
To facilitate working with multiple sheets from the same file, the ``ExcelFile``
2678-
class can be used to wrap the file and can be be passed into ``read_excel``
2678+
class can be used to wrap the file and can be passed into ``read_excel``
26792679
There will be a performance benefit for reading multiple sheets as the file is
26802680
read into memory only once.
26812681

doc/sphinxext/numpydoc/tests/test_docscrape.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
-------
4343
out : ndarray
4444
The drawn samples, arranged according to `shape`. If the
45-
shape given is (m,n,...), then the shape of `out` is is
45+
shape given is (m,n,...), then the shape of `out` is
4646
(m,n,...,N).
4747
4848
In other words, each entry ``out[i,j,...,:]`` is an N-dimensional
@@ -222,7 +222,7 @@ def test_str():
222222
-------
223223
out : ndarray
224224
The drawn samples, arranged according to `shape`. If the
225-
shape given is (m,n,...), then the shape of `out` is is
225+
shape given is (m,n,...), then the shape of `out` is
226226
(m,n,...,N).
227227
228228
In other words, each entry ``out[i,j,...,:]`` is an N-dimensional
@@ -340,7 +340,7 @@ def test_sphinx_str():
340340
**out** : ndarray
341341
342342
The drawn samples, arranged according to `shape`. If the
343-
shape given is (m,n,...), then the shape of `out` is is
343+
shape given is (m,n,...), then the shape of `out` is
344344
(m,n,...,N).
345345
346346
In other words, each entry ``out[i,j,...,:]`` is an N-dimensional

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ class Timedelta(_Timedelta):
897897
Represents a duration, the difference between two dates or times.
898898
899899
Timedelta is the pandas equivalent of python's ``datetime.timedelta``
900-
and is interchangable with it in most cases.
900+
and is interchangeable with it in most cases.
901901
902902
Parameters
903903
----------

pandas/_libs/tslibs/timezones.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ cpdef bint tz_compare(object start, object end):
295295
timezones. For example
296296
`<DstTzInfo 'Europe/Paris' LMT+0:09:00 STD>` and
297297
`<DstTzInfo 'Europe/Paris' CET+1:00:00 STD>` are essentially same
298-
timezones but aren't evaluted such, but the string representation
298+
timezones but aren't evaluated such, but the string representation
299299
for both of these is `'Europe/Paris'`.
300300
301301
This exists only to add a notion of equality to pytz-style zones

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4115,7 +4115,7 @@ def combine(self, other, func, fill_value=None, overwrite=True):
41154115
series[this_mask] = fill_value
41164116
otherSeries[other_mask] = fill_value
41174117

4118-
# if we have different dtypes, possibily promote
4118+
# if we have different dtypes, possibly promote
41194119
new_dtype = this_dtype
41204120
if not is_dtype_equal(this_dtype, other_dtype):
41214121
new_dtype = find_common_type([this_dtype, other_dtype])

pandas/core/indexes/datetimelike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def freqstr(self):
332332
@cache_readonly
333333
def inferred_freq(self):
334334
"""
335-
Trys to return a string representing a frequency guess,
335+
Tryies to return a string representing a frequency guess,
336336
generated by infer_freq. Returns None if it can't autodetect the
337337
frequency.
338338
"""

pandas/core/sparse/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def __init__(self, data=None, index=None, columns=None, default_kind=None,
120120
if dtype is not None:
121121
mgr = mgr.astype(dtype)
122122
else:
123-
msg = ('SparseDataFrame called with unkown type "{data_type}" '
123+
msg = ('SparseDataFrame called with unknown type "{data_type}" '
124124
'for data argument')
125125
raise TypeError(msg.format(data_type=type(data).__name__))
126126

0 commit comments

Comments
 (0)