You are working with the df_rock that contains sonar signals from two object classes: rocks and mines. In the first four columns, you can see wavelengths that the sonar got from different angles. The last two columns, called name and label respectively, contain an individual object key and the category of an object: rock or mine.
Suppose that now, for convenience, you want to set the column called name as index.
You can see a dataset sample below. Note that df_rock is a variable name that contains the whole DataFrame. Just insert your code before the print() function.