Skip to content

Commit dd87cbe

Browse files
star1327pzhangbowen-coder
authored andcommitted
DOC: Correct grammatical issues with a/an usage (pandas-dev#62904)
1 parent 0eed2c8 commit dd87cbe

File tree

15 files changed

+18
-18
lines changed

15 files changed

+18
-18
lines changed

doc/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def _process_single_doc(self, single_doc):
105105
@staticmethod
106106
def _run_os(*args) -> None:
107107
"""
108-
Execute a command as a OS terminal.
108+
Execute a command as an OS terminal.
109109
110110
Parameters
111111
----------

pandas/_config/localization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def can_set_locale(lc: str, lc_var: int = locale.LC_ALL) -> bool:
7979
with set_locale(lc, lc_var=lc_var):
8080
pass
8181
except (ValueError, locale.Error):
82-
# horrible name for a Exception subclass
82+
# horrible name for an Exception subclass
8383
return False
8484
else:
8585
return True

pandas/core/arrays/categorical.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class Categorical(NDArrayBackedExtensionArray, PandasObject, ObjectStringArrayMi
269269
categories are assumed to be the unique values of `values` (sorted, if
270270
possible, otherwise in the order in which they appear).
271271
ordered : bool, default False
272-
Whether or not this categorical is treated as a ordered categorical.
272+
Whether or not this categorical is treated as an ordered categorical.
273273
If True, the resulting categorical will be ordered.
274274
An ordered categorical respects, when sorted, the order of its
275275
`categories` attribute (which in turn is the `categories` argument, if
@@ -1103,7 +1103,7 @@ def set_categories(
11031103
new_categories : Index-like
11041104
The categories in new order.
11051105
ordered : bool, default None
1106-
Whether or not the categorical is treated as a ordered categorical.
1106+
Whether or not the categorical is treated as an ordered categorical.
11071107
If not given, do not change the ordered information.
11081108
rename : bool, default False
11091109
Whether or not the new_categories should be considered as a rename
@@ -1277,7 +1277,7 @@ def reorder_categories(self, new_categories, ordered=None) -> Self:
12771277
new_categories : Index-like
12781278
The categories in new order.
12791279
ordered : bool, optional
1280-
Whether or not the categorical is treated as a ordered categorical.
1280+
Whether or not the categorical is treated as an ordered categorical.
12811281
If not given, do not change the ordered information.
12821282
12831283
Returns

pandas/core/arrays/timedeltas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ def _objects_to_td64ns(
12121212
data, unit=None, errors: DateTimeErrorChoices = "raise"
12131213
) -> np.ndarray:
12141214
"""
1215-
Convert a object-dtyped or string-dtyped array into an
1215+
Convert an object-dtyped or string-dtyped array into a
12161216
timedelta64[ns]-dtyped array.
12171217
12181218
Parameters

pandas/core/dtypes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ class Registry:
517517
"""
518518
Registry for dtype inference.
519519
520-
The registry allows one to map a string repr of a extension
520+
The registry allows one to map a string repr of an extension
521521
dtype to an extension dtype. The string alias can be used in several
522522
places, including
523523

pandas/core/dtypes/dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype):
176176
The categories are stored in an Index,
177177
and if an index is provided the dtype of that index will be used.
178178
ordered : bool or None, default False
179-
Whether or not this categorical is treated as a ordered categorical.
179+
Whether or not this categorical is treated as an ordered categorical.
180180
None can be used to maintain the ordered value of existing categoricals when
181181
used in operations that combine categoricals, e.g. astype, and will resolve to
182182
False if there is no existing ordered to maintain.

pandas/core/internals/construction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def ndarray_to_mgr(
215215
# GH#19157
216216

217217
if isinstance(values, (np.ndarray, ExtensionArray)) and values.ndim > 1:
218-
# GH#12513 a EA dtype passed with a 2D array, split into
218+
# GH#12513 an EA dtype passed with a 2D array, split into
219219
# multiple EAs that view the values
220220
# error: No overload variant of "__getitem__" of "ExtensionArray"
221221
# matches argument type "Tuple[slice, int]"

pandas/core/window/expanding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ def corr(
14541454

14551455
class ExpandingGroupby(BaseWindowGroupby, Expanding):
14561456
"""
1457-
Provide a expanding groupby implementation.
1457+
Provide an expanding groupby implementation.
14581458
"""
14591459

14601460
__module__ = "pandas.api.typing"

pandas/core/window/numba_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def generate_numba_table_func(
189189
"""
190190
Generate a numba jitted function to apply window calculations table-wise.
191191
192-
Func will be passed a M window size x N number of columns array, and
192+
Func will be passed an M window size x N number of columns array, and
193193
must return a 1 x N number of columns array.
194194
195195
1. jit the user's function

pandas/io/excel/_odswriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def _process_style(self, style: dict[str, Any]) -> str: ...
246246
def _process_style(self, style: None) -> None: ...
247247

248248
def _process_style(self, style: dict[str, Any] | None) -> str | None:
249-
"""Convert a style dictionary to a OpenDocument style sheet
249+
"""Convert a style dictionary to an OpenDocument style sheet
250250
251251
Parameters
252252
----------

0 commit comments

Comments
 (0)