Skip to content

Commit 70a083f

Browse files
bwignalltopper-123
authored andcommitted
Fix typos, via a Levenshtein-style corrector (#30341)
1 parent f36eac1 commit 70a083f

File tree

21 files changed

+27
-27
lines changed

21 files changed

+27
-27
lines changed

pandas/_config/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@
5757
DeprecatedOption = namedtuple("DeprecatedOption", "key msg rkey removal_ver")
5858
RegisteredOption = namedtuple("RegisteredOption", "key defval doc validator cb")
5959

60-
# holds deprecated option metdata
60+
# holds deprecated option metadata
6161
_deprecated_options: Dict[str, DeprecatedOption] = {}
6262

63-
# holds registered option metdata
63+
# holds registered option metadata
6464
_registered_options: Dict[str, RegisteredOption] = {}
6565

6666
# holds the current values for registered options

pandas/_libs/groupby.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ def group_quantile(ndarray[float64_t] out,
791791
out[i] = NaN
792792
else:
793793
# Calculate where to retrieve the desired value
794-
# Casting to int will intentionaly truncate result
794+
# Casting to int will intentionally truncate result
795795
idx = grp_start + <int64_t>(q * <float64_t>(non_na_sz - 1))
796796

797797
val = values[sort_arr[idx]]

pandas/_libs/index.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ cdef class IndexEngine:
288288

289289
def get_indexer_non_unique(self, targets):
290290
"""
291-
Return an indexer suitable for takng from a non unique index
291+
Return an indexer suitable for taking from a non unique index
292292
return the labels in the same order ast the target
293293
and a missing indexer into the targets (which correspond
294294
to the -1 indices in the results

pandas/_libs/lib.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def maybe_booleans_to_slice(ndarray[uint8_t] mask):
510510
@cython.boundscheck(False)
511511
def array_equivalent_object(left: object[:], right: object[:]) -> bool:
512512
"""
513-
Perform an element by element comparion on 1-d object arrays
513+
Perform an element by element comparison on 1-d object arrays
514514
taking into account nan positions.
515515
"""
516516
cdef:

pandas/_libs/src/klib/khash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ PANDAS_INLINE khint_t __ac_Wang_hash(khint_t key)
498498
*/
499499
#define kh_n_buckets(h) ((h)->n_buckets)
500500

501-
/* More conenient interfaces */
501+
/* More convenient interfaces */
502502

503503
/*! @function
504504
@abstract Instantiate a hash set containing integer keys

pandas/_libs/src/ujson/lib/ultrajsondec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric(struct DecoderState *ds) {
150150
case '7':
151151
case '8':
152152
case '9': {
153-
// FIXME: Check for arithemtic overflow here
153+
// FIXME: Check for arithmetic overflow here
154154
// PERF: Don't do 64-bit arithmetic here unless we know we have
155155
// to
156156
intValue = intValue * 10ULL + (JSLONG)(chr - 48);
@@ -235,7 +235,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric(struct DecoderState *ds) {
235235
}
236236

237237
BREAK_FRC_LOOP:
238-
// FIXME: Check for arithemtic overflow here
238+
// FIXME: Check for arithmetic overflow here
239239
ds->lastType = JT_DOUBLE;
240240
ds->start = offset;
241241
return ds->dec->newDouble(
@@ -282,7 +282,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric(struct DecoderState *ds) {
282282
}
283283

284284
BREAK_EXP_LOOP:
285-
// FIXME: Check for arithemtic overflow here
285+
// FIXME: Check for arithmetic overflow here
286286
ds->lastType = JT_DOUBLE;
287287
ds->start = offset;
288288
return ds->dec->newDouble(

pandas/_libs/src/ujson/python/objToJSON.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,7 @@ char **NpyArr_encodeLabels(PyArrayObject *labels, PyObjectEncoder *enc,
16321632
sprintf(buf, "%" NPY_INT64_FMT, value);
16331633
len = strlen(cLabel);
16341634
}
1635-
} else { // Fallack to string representation
1635+
} else { // Fallback to string representation
16361636
PyObject *str = PyObject_Str(item);
16371637
if (str == NULL) {
16381638
Py_DECREF(item);

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class Timestamp(_Timestamp):
324324
325325
Function is not implemented. Use pd.to_datetime().
326326
"""
327-
raise NotImplementedError("Timestamp.strptime() is not implmented."
327+
raise NotImplementedError("Timestamp.strptime() is not implemented."
328328
"Use to_datetime() to parse date strings.")
329329

330330
@classmethod

pandas/core/arrays/sparse/dtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def update_dtype(self, dtype):
290290
Returns
291291
-------
292292
SparseDtype
293-
A new SparseDtype with the corret `dtype` and fill value
293+
A new SparseDtype with the correct `dtype` and fill value
294294
for that `dtype`.
295295
296296
Raises

pandas/core/arrays/string_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __from_arrow__(self, array):
8686

8787
results = []
8888
for arr in chunks:
89-
# using _from_sequence to ensure None is convered to NA
89+
# using _from_sequence to ensure None is converted to NA
9090
str_arr = StringArray._from_sequence(np.array(arr))
9191
results.append(str_arr)
9292

@@ -153,7 +153,7 @@ class StringArray(PandasArray):
153153
...
154154
ValueError: StringArray requires an object-dtype ndarray of strings.
155155
156-
For comparision methods, this returns a :class:`pandas.BooleanArray`
156+
For comparison methods, this returns a :class:`pandas.BooleanArray`
157157
158158
>>> pd.array(["a", None, "c"], dtype="string") == "a"
159159
<BooleanArray>

0 commit comments

Comments
 (0)