DOC: Cannot acces to index value when using 'key' function in 'Sort_index'
[https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.sort_index.html]

#### Documentation problem

[When setting  'key argument' in sort_index function (DataFrame object method), I cannot acces to index value because it's consider as an object. I haven't found the way of extracting Index' object value. I do not know if I'm wrong or a new Index method would be required for accesing that value]

#### Suggested fix for documentation

[Here I attached some code to let me explain:
df = pd.DataFrame({"a": [1, 2, 3, 4]}, index=['(0-1)', '(1-2)', '(2-3)', '(3-4)'])
df.sort_index(key=lambda x: int(x[1]))

Useful information: https://stackoverflow.com/questions/64160980/key-function-when-using-sort-index]
