I have a pandas dataframe whose indices look like:

```
df.index
['a_1', 'b_2', 'c_3', ... ]

```

I want to rename these indices to:

```
['a', 'b', 'c', ... ]

```

How do I do this without specifying a dictionary with explicit keys for each index value?  

I tried:

```
df.rename( index = lambda x: x.split( '_' )[0] )

```

but this throws up an error:

```
AssertionError: New axis must be unique to rename

```