- I have read here that pandas indexes are backed by a hash table
- I also know that hash tables cannot have duplicate keys
So why does the following code work:
pd.DataFrame({'a':['a','a','b'],'b':[1,2,3]}).set_index('a').loc['a',:]
output:
b
a
a 1
a 2