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: correct Series.searchsorted example #19784

Merged
merged 3 commits into from
Feb 21, 2018

Conversation

ZhuBaohe
Copy link
Contributor

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

@pep8speaks
Copy link

pep8speaks commented Feb 20, 2018

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

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a 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!

@@ -1154,32 +1154,27 @@ def factorize(self, sort=False, na_sentinel=-1):
dtype: int64

>>> x.searchsorted(4)
array([3])
array([3], dtype=int64)
Copy link
Member

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.

Copy link
Contributor Author

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

@jorisvandenbossche jorisvandenbossche changed the title DOC: correct Series.searchsorted exsample DOC: correct Series.searchsorted example Feb 20, 2018
@codecov
Copy link

codecov bot commented Feb 20, 2018

Codecov Report

Merging #19784 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.98% <ø> (-0.01%) ⬇️
#single 41.8% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/base.py 96.79% <ø> (ø) ⬆️
pandas/util/testing.py 83.64% <0%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af5e8ec...6ffdac7. Read the comment docs.

@jorisvandenbossche jorisvandenbossche merged commit f8dfcfb into pandas-dev:master Feb 21, 2018
@jorisvandenbossche
Copy link
Member

@ZhuBaohe Thanks a lot!

@ZhuBaohe ZhuBaohe deleted the fix branch February 21, 2018 14:04
harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
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.

3 participants