From 1b4fc693451c826898774d3fb9883a9065fb10a6 Mon Sep 17 00:00:00 2001 From: bluestarunderscore Date: Thu, 5 Dec 2024 13:38:30 -0800 Subject: [PATCH 1/2] Fix iloc wording error on indexing user guide page --- doc/source/user_guide/indexing.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/source/user_guide/indexing.rst b/doc/source/user_guide/indexing.rst index 503f7cc7cbe73..94d76ccbe3178 100644 --- a/doc/source/user_guide/indexing.rst +++ b/doc/source/user_guide/indexing.rst @@ -858,9 +858,10 @@ and :ref:`Advanced Indexing ` you may select along more than one axis .. warning:: - ``iloc`` supports two kinds of boolean indexing. If the indexer is a boolean ``Series``, - an error will be raised. For instance, in the following example, ``df.iloc[s.values, 1]`` is ok. - The boolean indexer is an array. But ``df.iloc[s, 1]`` would raise ``ValueError``. + While ``loc`` supports two kinds of boolean indexing, ``iloc`` only supports indexing with a + boolean array. If the indexer is a boolean ``Series``, an error will be raised. For instance, + in the following example, ``df.iloc[s.values, 1]`` is ok. The boolean indexer is an array. + But ``df.iloc[s, 1]`` would raise ``ValueError``. .. ipython:: python From b9b54a557f912c5d5da69e25e84976fcbe1046c9 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Thu, 2 Jan 2025 10:39:00 -0800 Subject: [PATCH 2/2] Update doc/source/user_guide/indexing.rst --- doc/source/user_guide/indexing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/user_guide/indexing.rst b/doc/source/user_guide/indexing.rst index 94d76ccbe3178..ed5c7806b2e23 100644 --- a/doc/source/user_guide/indexing.rst +++ b/doc/source/user_guide/indexing.rst @@ -858,9 +858,9 @@ and :ref:`Advanced Indexing ` you may select along more than one axis .. warning:: - While ``loc`` supports two kinds of boolean indexing, ``iloc`` only supports indexing with a - boolean array. If the indexer is a boolean ``Series``, an error will be raised. For instance, - in the following example, ``df.iloc[s.values, 1]`` is ok. The boolean indexer is an array. + While ``loc`` supports two kinds of boolean indexing, ``iloc`` only supports indexing with a + boolean array. If the indexer is a boolean ``Series``, an error will be raised. For instance, + in the following example, ``df.iloc[s.values, 1]`` is ok. The boolean indexer is an array. But ``df.iloc[s, 1]`` would raise ``ValueError``. .. ipython:: python