Closed
Description
n = 5
df = DataFrame({'a': randint(3, size=n),
'b': randn(n)})
df2 = DataFrame({'a': randint(4, size=n),
'b': df.b + (rand(n) > 0.5).astype(float)})
df.isin(df2)
yields
a | b | |
---|---|---|
0 | False | True |
1 | False | True |
2 | False | False |
3 | False | False |
4 | False | True |
I might expect it to go column by column calling isin
on the intersection of the columns. I'm not sure if this was ever defined when DataFrame.isin()
was implemented.