Given a df
in[0]df1 out[0] DATE REVENUE COST POSITION FACTOR 0 2017/01/01 1000 900 10 1 2017/01/01 900 700 9 2 2
I hope this works :)
df.reset_index(inplace=True) # Resets the index, makes factor a column df.drop("Factor",axis=1,inplace=True) # drop factor from axis 1 and make changes permanent by inplace=True