Skip to content
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

Implement logical operators on DataFrame, &, |, ^, ~ #347

Closed
wesm opened this issue Nov 7, 2011 · 0 comments
Closed

Implement logical operators on DataFrame, &, |, ^, ~ #347

wesm opened this issue Nov 7, 2011 · 0 comments
Milestone

Comments

@wesm
Copy link
Member

wesm commented Nov 7, 2011

code example from ML

from pandas import *
df1 = {'a': {'a': True, 'b': False, 'c': False, 'd': True, 'e': True},
 'b': {'a': False, 'b': True, 'c': False, 'd': False, 'e': False},
 'c': {'a': False, 'b': False, 'c': True, 'd': False, 'e': False},
 'd': {'a': True, 'b': False, 'c': False, 'd': True, 'e': True},
 'e': {'a': True, 'b': False, 'c': False, 'd': True, 'e': True}}

df2 = {'a': {'a': True, 'b': False, 'c': True, 'd': False, 'e': False},
 'b': {'a': False, 'b': True, 'c': False, 'd': False, 'e': False},
 'c': {'a': True, 'b': False, 'c': True, 'd': False, 'e': False},
 'd': {'a': False, 'b': False, 'c': False, 'd': True, 'e': False},
 'e': {'a': False, 'b': False, 'c': False, 'd': False, 'e': True}}

df1 = DataFrame(df1)
df2 = DataFrame(df2)

df3 = (df1 and df2)
@wesm wesm closed this as completed Nov 8, 2011
dan-nadler pushed a commit to dan-nadler/pandas that referenced this issue Sep 23, 2019
* Update _pandas_ndarray_store.py

* Update with unit test

* change assertion in unit test to check for frame equality

* Set index names and column names since artic will give them default names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant