Skip to content

BUG: Series.is_unique has extra output if contains objects with __ne__ defined #20691

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

Merged
merged 3 commits into from
Apr 15, 2018

Conversation

Dr-Irv
Copy link
Contributor

@Dr-Irv Dr-Irv commented Apr 13, 2018

Simple change from _checknan to checknull in pandas/_libs/hashtable_class_helper.pxi.in

Checked performance, and there is no difference.

@codecov
Copy link

codecov bot commented Apr 13, 2018

Codecov Report

Merging #20691 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #20691   +/-   ##
=======================================
  Coverage   91.84%   91.84%           
=======================================
  Files         153      153           
  Lines       49275    49275           
=======================================
  Hits        45255    45255           
  Misses       4020     4020
Flag Coverage Δ
#multiple 90.23% <ø> (ø) ⬆️
#single 41.91% <ø> (ø) ⬆️

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 ad5affb...ee71a90. Read the comment docs.

@@ -870,7 +870,7 @@ cdef class PyObjectHashTable(HashTable):
for i in range(n):
val = values[i]
hash(val)
if not _checknan(val):
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this might be the only usage of checknan. can you remove it (from util.pxd) and see?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seemed to be. There was an import to remove in hashtable and the definition in util. Removing them passed tests on my laptop. Have pushed new version.

@@ -1175,3 +1175,4 @@ Other
- Improved error message when attempting to use a Python keyword as an identifier in a ``numexpr`` backed query (:issue:`18221`)
- Bug in accessing a :func:`pandas.get_option`, which raised ``KeyError`` rather than ``OptionError`` when looking up a non-existant option key in some cases (:issue:`19789`)
- Bug in :func:`assert_series_equal` and :func:`assert_frame_equal` for Series or DataFrames with differing unicode data (:issue:`20503`)
- Bug in ``Series.is_unique`` where extraneous output in stderr is shown if Series contains objects with ``__ne__`` defined (:issue:`20661`)
Copy link
Contributor

Choose a reason for hiding this comment

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

move to indexing

@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Compat pandas objects compatability with Numpy or Python functions labels Apr 14, 2018
@Dr-Irv
Copy link
Contributor Author

Dr-Irv commented Apr 15, 2018

@jreback Removing checknan works, but failure was due to a network area with Amazon S3. How can I get the travis run to be done again?

@jreback jreback added this to the 0.23.0 milestone Apr 15, 2018
@jreback jreback merged commit 7f7f3d4 into pandas-dev:master Apr 15, 2018
@jreback
Copy link
Contributor

jreback commented Apr 15, 2018

thanks @Dr-Irv

yeah sometimes the builds fail for extraneous reasons. you can push a dummy commit if you want, e.g.

git commit --amend -C HEAD

@Dr-Irv Dr-Irv deleted the issue20661 branch April 15, 2018 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Series.is_unique has errors on objects with __ne__ defined
2 participants