-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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: correct Series.searchsorted example #19784
Conversation
Hello @ZhuBaohe! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on February 21, 2018 at 00:56 Hours UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
pandas/core/base.py
Outdated
@@ -1154,32 +1154,27 @@ def factorize(self, sort=False, na_sentinel=-1): | |||
dtype: int64 | |||
|
|||
>>> x.searchsorted(4) | |||
array([3]) | |||
array([3], dtype=int64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason you are adding the 'dtype=int64' here? I don't see that in the output of my console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears in my console, but I already delete them in 6ffdac7
Codecov Report
@@ Coverage Diff @@
## master #19784 +/- ##
==========================================
- Coverage 91.61% 91.6% -0.01%
==========================================
Files 150 150
Lines 48887 48887
==========================================
- Hits 44786 44784 -2
- Misses 4101 4103 +2
Continue to review full report at Codecov.
|
@ZhuBaohe Thanks a lot! |
two major changes:
categories must be ordered using series.searchsorted.
delete last two exsamples because of
ValueError: Value(s) to be inserted must be in categories
.closes #xxxx
tests added / passed
passes
git diff upstream/master -u -- "*.py" | flake8 --diff
whatsnew entry