@@ -429,7 +429,7 @@ For the rationale behind this behavior, see
429
429
s = pd.Series(list (' abcdef' ), index = [0 , 3 , 2 , 5 , 4 , 2 ])
430
430
s.loc[3 :5 ]
431
431
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 ,
433
433
an error will be raised. For instance, in the above example, ``s.loc[2:5] `` would raise a ``KeyError ``.
434
434
435
435
For more information about duplicate labels, see
@@ -1138,10 +1138,10 @@ Setting with enlargement conditionally using :func:`numpy`
1138
1138
----------------------------------------------------------
1139
1139
1140
1140
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
1142
1142
values are determined conditionally.
1143
1143
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
1145
1145
set a new column color to 'green' when the second column has 'Z'. You can do the
1146
1146
following:
1147
1147
@@ -1293,8 +1293,8 @@ Full numpy-like syntax:
1293
1293
df.query(' (a < b) & (b < c)' )
1294
1294
df[(df[' a' ] < df[' b' ]) & (df[' b' ] < df[' c' ])]
1295
1295
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 ``| ``):
1298
1298
1299
1299
.. ipython :: python
1300
1300
0 commit comments