Skip to content

Bitwise operation weirdness #9016

Closed
Closed
@benkuhn

Description

@benkuhn

It seems like pd.Series([x]) | pd.Series([y]) with x, y integers returns pd.Series([x | y]).astype(bool). This is a reasonable semantic, but pd.Series([x]) & pd.Series([y]) seems to return pd.Series([x & y % 2]) == 1, which is a lot weirder. Is there a justification for this? I couldn't find one in the documentation (& is hard to search!), so it may be a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

        翻译: