Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Add return value for Index.slice_locs when label not found #32680 #58135

Merged
merged 13 commits into from
Apr 3, 2024

Conversation

KeiOshima
Copy link
Contributor

@@ -6447,6 +6447,8 @@ def slice_locs(self, start=None, end=None, step=None) -> tuple[int, int]:
Notes
-----
This method only works if the index is monotonic or unique.
If a non-existent label is provided the return slice location will be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you show this as an example below instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes will do

@mroeschke mroeschke added the Docs label Apr 3, 2024
@KeiOshima KeiOshima requested a review from mroeschke April 3, 2024 21:19
@mroeschke mroeschke merged commit ec3eddd into pandas-dev:main Apr 3, 2024
46 checks passed
@mroeschke
Copy link
Member

Thanks @KeiOshima

pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
…s-dev#32680 (pandas-dev#58135)

* add return value if non-existent label is provided in pandas.Index.slice_locs

* fix Line too long error

* remove trailing whitespace

* fix double line break

* writing as example instead of note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants