I have a DataFrame
df like this.
Number SomeValue SomeOtherValue 10 10 1.0 11 3 1.1
when I look at the data frame using
df.head(), I get this
Number SomeValue SomeOtherValue 0 10 10 1.0 1 11 3 1.1
I would like
Number to be my index, so I do something like this:
df.index = df.Number df = df.drop('Number', 1);
This seems a bit clumsy, so is there another way of promoting a column to an index?