Why doesn\'t df.index.map(dict) work like df[\'column_name\'].map(dict)?
df.index.map(dict)
df[\'column_name\'].map(dict)
Here\'s a little example of trying to use index.map:
Adding get at the end
get
df['Two']=df.index.map(map_dict.get) df Out[155]: one Two A 10 every B 20 good C 30 boy D 40 does E 50 fine