A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/docs/dev/user_guide/../reference/api/pandas.Index.slice_locs.html below:

pandas.Index.slice_locs — pandas 3.0.0.dev0+2232.ga2315af1df documentation

pandas.Index.slice_locs#
Index.slice_locs(start=None, end=None, step=None)[source]#

Compute slice locations for input labels.

Parameters:
startlabel, default None

If None, defaults to the beginning.

endlabel, default None

If None, defaults to the end.

stepint, defaults None

If None, defaults to 1.

Returns:
tuple[int, int]

Returns a tuple of two integers representing the slice locations for the input labels within the index.

Notes

This method only works if the index is monotonic or unique.

Examples

>>> idx = pd.Index(list("abcd"))
>>> idx.slice_locs(start="b", end="c")
(1, 3)
>>> idx = pd.Index(list("bcde"))
>>> idx.slice_locs(start="a", end="c")
(0, 2)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4