Error is located in "Index as ordered set" section
indA = pd.Index([1, 3, 5, 7, 9])
indB = pd.Index([2, 3, 5, 7, 11])
indA & indB # intersection
returns
Index([0, 3, 5, 7, 9], dtype='int64')
but for intersection result should be [3, 5, 7], instead pandas performs logical AND
indA.intersection(indB) # Index([3, 5, 7], dtype='int64')
P.S. I can open PR, but then section would look more organically if for examples object methods would be presented, with comment that boolean ops are also supported
Error is located in "Index as ordered set" section
indA & indB # intersectionreturns
Index([0, 3, 5, 7, 9], dtype='int64')but for intersection result should be [3, 5, 7], instead pandas performs logical AND
indA.intersection(indB) # Index([3, 5, 7], dtype='int64')P.S. I can open PR, but then section would look more organically if for examples object methods would be presented, with comment that boolean ops are also supported