columns as the indexin [ ]frame frame set_index([' '' ']in [ ]frame out[ ] one two by default the columns are removed from the dataframethough you can leave them inin [ ]frame set_index([' '' ']drop=falseout[ ] one one one one two two two two two reset_indexon the other handdoes the opposite of set_indexthe hierarchical index levels are are moved into the columnsin [ ]frame reset_index(out[ ] one one one two two two two other pandas topics here are some additional topics that may be of use to you in your data travels integer indexing working with pandas objects indexed by integers is something that often trips up new users due to some differences with indexing semantics on built-in python data other pandas topics www it-ebooks info