Skip to content

Commit 27fdae8

Browse files
authored
DOC: Correct many grammatical issues (#63217)
1 parent a885d67 commit 27fdae8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+61
-61
lines changed

pandas/_libs/hashtable_class_helper.pxi.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ cdef class StringHashTable(HashTable):
10701070
val = values[i]
10711071

10721072
if isinstance(val, str):
1073-
# GH#31499 if we have a np.str_ PyUnicode_AsUTF8 won't recognize
1073+
# GH#31499 if we have an np.str_ PyUnicode_AsUTF8 won't recognize
10741074
# it as a str, even though isinstance does.
10751075
v = PyUnicode_AsUTF8(<str>val)
10761076
else:
@@ -1108,7 +1108,7 @@ cdef class StringHashTable(HashTable):
11081108
val = values[i]
11091109

11101110
if isinstance(val, str):
1111-
# GH#31499 if we have a np.str_ PyUnicode_AsUTF8 won't recognize
1111+
# GH#31499 if we have an np.str_ PyUnicode_AsUTF8 won't recognize
11121112
# it as a str, even though isinstance does.
11131113
v = PyUnicode_AsUTF8(<str>val)
11141114
else:

pandas/_libs/index.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ cdef bint is_definitely_invalid_key(object val):
5858

5959
cdef ndarray _get_bool_indexer(ndarray values, object val, ndarray mask = None):
6060
"""
61-
Return a ndarray[bool] of locations where val matches self.values.
61+
Return an ndarray[bool] of locations where val matches self.values.
6262
6363
If val is not NA, this is equivalent to `self.values == val`
6464
"""

pandas/_libs/tslib.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def format_array_from_datetime(
120120
NPY_DATETIMEUNIT reso=NPY_FR_ns,
121121
) -> np.ndarray:
122122
"""
123-
return a np object array of the string formatted values
123+
return an np object array of the string formatted values
124124

125125
Parameters
126126
----------

pandas/_libs/tslibs/conversion.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ cdef (int64_t, int) precision_from_unit(
276276

277277
cdef int64_t get_datetime64_nanos(object val, NPY_DATETIMEUNIT reso) except? -1:
278278
"""
279-
Extract the value and unit from a np.datetime64 object, then convert the
279+
Extract the value and unit from an np.datetime64 object, then convert the
280280
value to nanoseconds if necessary.
281281
"""
282282
cdef:

pandas/_libs/tslibs/nattype.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@ cdef bint checknull_with_nat(object val):
18851885

18861886
cdef bint is_dt64nat(object val):
18871887
"""
1888-
Is this a np.datetime64 object np.datetime64("NaT").
1888+
Is this an np.datetime64 object np.datetime64("NaT").
18891889
"""
18901890
if cnp.is_datetime64_object(val):
18911891
return cnp.get_datetime64_value(val) == NPY_NAT
@@ -1894,7 +1894,7 @@ cdef bint is_dt64nat(object val):
18941894

18951895
cdef bint is_td64nat(object val):
18961896
"""
1897-
Is this a np.timedelta64 object np.timedelta64("NaT").
1897+
Is this an np.timedelta64 object np.timedelta64("NaT").
18981898
"""
18991899
if cnp.is_timedelta64_object(val):
19001900
return cnp.get_timedelta64_value(val) == NPY_NAT

pandas/_libs/tslibs/offsets.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ cdef class BaseOffset:
818818
state["normalize"] = self.normalize
819819

820820
# we don't want to actually pickle the calendar object
821-
# as its a np.busyday; we recreate on deserialization
821+
# as its an np.busyday; we recreate on deserialization
822822
state.pop("calendar", None)
823823
if "kwds" in state:
824824
state["kwds"].pop("calendar", None)

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ cdef class _Timedelta(timedelta):
14891489
"""
14901490
cdef:
14911491
str abbrev = npy_unit_to_abbrev(self._creso)
1492-
# TODO: way to create a np.timedelta64 obj with the reso directly
1492+
# TODO: way to create an np.timedelta64 obj with the reso directly
14931493
# instead of having to get the abbrev?
14941494
return np.timedelta64(self._value, abbrev)
14951495

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ cdef class _Timestamp(ABCTimestamp):
412412

413413
@classmethod
414414
def _from_dt64(cls, dt64: np.datetime64):
415-
# construct a Timestamp from a np.datetime64 object, keeping the
415+
# construct a Timestamp from an np.datetime64 object, keeping the
416416
# resolution of the input.
417417
# This is here mainly so we can incrementally implement non-nano
418418
# (e.g. only tznaive at first)

pandas/_testing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def get_cython_table_params(ndframe, func_names_and_expected):
402402
----------
403403
ndframe : DataFrame or Series
404404
func_names_and_expected : Sequence of two items
405-
The first item is a name of a NDFrame method ('sum', 'prod') etc.
405+
The first item is a name of an NDFrame method ('sum', 'prod') etc.
406406
The second item is the expected return value.
407407
408408
Returns

pandas/_testing/asserters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ def assert_extension_array_equal(
803803
):
804804
return
805805
# Avoid slow object-dtype comparisons
806-
# np.asarray for case where we have a np.MaskedArray
806+
# np.asarray for case where we have an np.MaskedArray
807807
assert_numpy_array_equal(
808808
np.asarray(left.asi8),
809809
np.asarray(right.asi8),

0 commit comments

Comments
 (0)