Skip to content

Commit b8cbcc0

Browse files
authored
DOC: clarify and spellcheck indexing documentation (#38951)
1 parent df69f2a commit b8cbcc0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/source/user_guide/indexing.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ For the rationale behind this behavior, see
429429
s = pd.Series(list('abcdef'), index=[0, 3, 2, 5, 4, 2])
430430
s.loc[3:5]
431431
432-
Also, if the index has duplicate labels *and* either the start or the stop label is dupulicated,
432+
Also, if the index has duplicate labels *and* either the start or the stop label is duplicated,
433433
an error will be raised. For instance, in the above example, ``s.loc[2:5]`` would raise a ``KeyError``.
434434

435435
For more information about duplicate labels, see
@@ -1138,10 +1138,10 @@ Setting with enlargement conditionally using :func:`numpy`
11381138
----------------------------------------------------------
11391139

11401140
An alternative to :meth:`~pandas.DataFrame.where` is to use :func:`numpy.where`.
1141-
Combined with setting a new column, you can use it to enlarge a dataframe where the
1141+
Combined with setting a new column, you can use it to enlarge a DataFrame where the
11421142
values are determined conditionally.
11431143

1144-
Consider you have two choices to choose from in the following dataframe. And you want to
1144+
Consider you have two choices to choose from in the following DataFrame. And you want to
11451145
set a new column color to 'green' when the second column has 'Z'. You can do the
11461146
following:
11471147

@@ -1293,8 +1293,8 @@ Full numpy-like syntax:
12931293
df.query('(a < b) & (b < c)')
12941294
df[(df['a'] < df['b']) & (df['b'] < df['c'])]
12951295
1296-
Slightly nicer by removing the parentheses (by binding making comparison
1297-
operators bind tighter than ``&`` and ``|``).
1296+
Slightly nicer by removing the parentheses (comparison operators bind tighter
1297+
than ``&`` and ``|``):
12981298

12991299
.. ipython:: python
13001300

0 commit comments

Comments
 (0)