Skip to content

Commit 0fdaa01

Browse files
Docs: Add note about exception for integer slices with float indices (#58017)
* docs: Add note about exception for integer slices with float indices * Remove whitespace * Update doc/source/user_guide/indexing.rst Co-authored-by: Matthew Roeschke <[email protected]> * Remove trailing whitespace * Update doc/source/user_guide/indexing.rst --------- Co-authored-by: Matthew Roeschke <[email protected]>
1 parent ce581e6 commit 0fdaa01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/source/user_guide/indexing.rst

+4
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ The most robust and consistent way of slicing ranges along arbitrary axes is
262262
described in the :ref:`Selection by Position <indexing.integer>` section
263263
detailing the ``.iloc`` method. For now, we explain the semantics of slicing using the ``[]`` operator.
264264

265+
.. note::
266+
267+
When the :class:`Series` has float indices, slicing will select by position.
268+
265269
With Series, the syntax works exactly as with an ndarray, returning a slice of
266270
the values and the corresponding labels:
267271

0 commit comments

Comments
 (0)