How to convert the column of Data frame to index of Data frame in python?

ipython

#1

I have created a Data frame in Ipython notebook .I want to know is there a way by which column of Data frame is converted to index of Data frame.

 frame = DataFrame({'a': range(7), 'b': range(7, 0, -1),
    .....: 'c': ['one', 'one', 'one', 'two', 'two', 'two', 'two'],
    .....: 'd': [0, 1, 2, 0, 1, 2, 3]})
    
    frame
        a b  c  d
    0   0 7 one 0
    1   1 6 one 1
    2   2 5 one 2
    3   3 4 two 0
    4   4 3 two 1
    5   5 2 two 2
    6   6 1 two 3

#2

You could use the set_index command as follows:

frame = frame.set_index(‘a’)