BUG: Series.rename treats Series as list-like instead of mapping (original) (raw)

Code Sample, a copy-pastable example if possible

In [6]: s = pd.Series([0, 1])

In [5]: s.rename(pd.Series({0: 10, 1: 20})) Out[5]: 0 0 1 1 Name: [10, 20], dtype: int64

Problem is here using an isinstance(,MutableMapping) instead of com.is_dict_like. rename_axis should be fine, but will add tests for both.