Skip to content

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

@jbrockmendel

Description

@jbrockmendel

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions