Closed
Description
Series.map works when passed a dict, but Index.map doesn't:
>>> s = pd.Series(['a', 'b', 'c', 'd'], index=['a', 'b', 'c', 'd'])
>>> d = {'a': 0, 'b': 1, 'c': 2, 'd': 3}
>>> s.map(d)
a 0
b 1
c 2
d 3
dtype: int64
>>> s.index.map(d)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/evanpw/Workspace/pandas/pandas/indexes/base.py", line 2305, in map
return self._arrmap(self.values, mapper)
File "pandas/src/generated.pyx", line 2356, in pandas.algos.arrmap_object (pandas/algos.c:70221)
TypeError: 'dict' object is not callable
PR to follow shortly