Skip to content

Bitwise operators are conflated with intersection, union, symmetric difference operators in NB 03.01 #429

@deburg0

Description

@deburg0

In the Section "Index as ordered Set", Bitwise operators are mistakenly equated with Set Operators: intersection, union, symmetric difference.

indA = pd.Index([1, 3, 5, 7, 9])
indB = pd.Index([2, 3, 5, 7, 11])

indA.intersection(indB)
Index([3, 5, 7], dtype='int64')

indA & indB # intersection (actually binary AND)
Index([0, 3, 5, 7, 9], dtype='int64')

Not a big deal, but confusing.

Thank you for your book.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions