import pandas as pd
a = pd.Series('1')
b = pd.Series(1)
a.isin(b)
0 False
dtype: bool
b.isin(a)
0 True
dtype: bool
It looks like there is a similar open issue for .isin()
called Pandas doesn't always cast strings to int consistently when using .isin(): https://github.com/pandas-dev/pandas/issues/24918
The issue was opened and last commented on in January 2019.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With