question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: unwanted casting in .isin

See original GitHub issue

xref #19508 for a partial PR

In [3]: values = [1, 0.5]
   ...: pd.Series([1, 0]).isin(values)
   ...: 
Out[3]: 
0    True
1    True
dtype: bool

should be [True, False]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gorbondigacommented, Jul 12, 2018

It’s fine @KalyanGokhale, I am looking for some bug to start contributing to pandas, I though it culd be a good one, this one, but if you already solved it go for it

1reaction
KalyanGokhalecommented, Jul 11, 2018

@jdoepfert Thanks for the groundwork on initial PR @gorbondiga just saw your comment. I was working on this for last 2 days and have fixed it - sorry for not commenting here earlier. If you haven’t already started working on it, please let me know whether its OK for me to submit PR? In case I don’t hear back by Friday, then I’ll submit a PR assuming its fine for me to do so. @jreback all tests do pass, though pandas/tests/io/test_clipboard.py module fails as part of suite - however passes when ran individually (seems unrelated to this bug fix). Have also ran the asvs for algorithms and results are as follows:

       before           after         ratio
     [5380fcd4]       [bf0543f1]
+     1.80±0.01ms      2.26±0.02ms     1.25  algorithms.Hashing.time_series_int
-     2.21±0.02ms      1.81±0.01ms     0.82  algorithms.Hashing.time_series_dates
-        2.21±0ms      1.80±0.02ms     0.81  algorithms.Hashing.time_series_float
-        15.9±3ms      11.8±0.09ms     0.74  algorithms.Factorize.time_factorize_float(False)

SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
Read more comments on GitHub >

github_iconTop Results From Across the Web

BUG: isin incorrectly casting ints to datetimes #37528 - GitHub
There are a bunch of GH issues about isin (added a new label yesterday), many of which are about unwanted casting. I haven't...
Read more >
Casting Insects in Resin - YouTube
Visit bit.ly/insectphoto to submit your insect /arthropod photo for a chance to get it added to the wall.In this video we will discuss...
Read more >
ClassCastException: cannot cast jdk.nashorn.internal.scripts.JO
Backport - A issue that is required to port a Bug or Feature into another product JDK-8058486 ClassCastException: cannot cast jdk.nashorn.internal.scripts.
Read more >
[1.8][compiler] "Unnecessary cast" problems in lambda ... - Bugs
One solution would be to make a weaker warning "cast may be unnecessary", so > that UI can indeed trigger the rerun of...
Read more >
Integer casting bug? - c++ - Stack Overflow
Try adding LL postfix to the number, The number 2 * 2000000000 is an expression that is evaluated as an int (which overflows)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found