I ran into an odd behaviour when taking the intersection of two Indexes. Specifically,
left = pd.Index(['A','B','A','C']) right = pd.Index(['B','D']) left.intersection(right)
returns
Index(['B', 'C'], dtype='object')
However, I would expect this to return
Index(['B'], dtype='object')
If Index(['B', 'C'], dtype='object')
is the intended behaviour, can someone explain the rationale behind it?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4