Skip to content

Commit 990474b

Browse files
DOC: Clarify loc and iloc functionality in user_guide/indexing.html (#60501)
* Fix iloc wording error on indexing user guide page * Update doc/source/user_guide/indexing.rst --------- Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 6cf6963 commit 990474b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/source/user_guide/indexing.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,10 @@ and :ref:`Advanced Indexing <advanced>` you may select along more than one axis
858858
859859
.. warning::
860860

861-
``iloc`` supports two kinds of boolean indexing. If the indexer is a boolean ``Series``,
862-
an error will be raised. For instance, in the following example, ``df.iloc[s.values, 1]`` is ok.
863-
The boolean indexer is an array. But ``df.iloc[s, 1]`` would raise ``ValueError``.
861+
While ``loc`` supports two kinds of boolean indexing, ``iloc`` only supports indexing with a
862+
boolean array. If the indexer is a boolean ``Series``, an error will be raised. For instance,
863+
in the following example, ``df.iloc[s.values, 1]`` is ok. The boolean indexer is an array.
864+
But ``df.iloc[s, 1]`` would raise ``ValueError``.
864865

865866
.. ipython:: python
866867

0 commit comments

Comments
 (0)