Skip to content

API: disallow frame.__and__(other, axis="foo", fill_value="bar") etc #36796

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
jbrockmendel opened this issue Oct 1, 2020 · 1 comment · Fixed by #36843
Closed

API: disallow frame.__and__(other, axis="foo", fill_value="bar") etc #36796

jbrockmendel opened this issue Oct 1, 2020 · 1 comment · Fixed by #36843
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Milestone

Comments

@jbrockmendel
Copy link
Member

For code-sharing purposes we re-use ops.arith_method_FRAME for both flex and non-flex methods. As a result, the non-flex methods have the flex signature, and accept arguments not generally accepted by dunder methods. We even have a few tests e.g.

result = d.__and__(s, axis="columns")
result = d.__and__(s, axis=0)

in tests.frame.test_operators.

Should we disallow passing these arguments? Is it relevant that we do not have flex versions of and/or/xor?

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 1, 2020
@jreback
Copy link
Contributor

jreback commented Oct 7, 2020

Should we disallow passing these arguments?

yes

Is it relevant that we do not have flex versions of and/or/xor?

no; I mean we could have .and,.or,.xor prob not very useful anyhow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants