Skip to content

Series boolean intersection not label based #4947

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

Closed
hayd opened this issue Sep 23, 2013 · 0 comments · Fixed by #4953
Closed

Series boolean intersection not label based #4947

hayd opened this issue Sep 23, 2013 · 0 comments · Fixed by #4953
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions
Milestone

Comments

@hayd
Copy link
Contributor

hayd commented Sep 23, 2013

http://stackoverflow.com/questions/18952544/in-python-pandas-boolean-operation

In [1]: a = pd.Series([True, False, True], list('bca'))

In [2]: b = pd.Series([False, True, False], list('abc'))

In [3]: a & b
Out[3]:
b    False
c    False
a    False
dtype: bool

Expected to use labels:

In [6]: index = a.index | b.index

In [7]: a.reindex(index) & b.reindex(index)
Out[7]:
a    False
b     True
c    False
dtype: bool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant