python 2.7 - pandas DataFrame metadata and set_index -
after several hours of writing nice metadata handler pandas dataframe, this: >>> import pandas pd >>> = pd.dataframe({'frame':[0,1,2,3,4,5,6,7], 'x':[1,2,2,2,3,4,2,11], 'y':[2,2,3,2,2,3,2,10]}) >>> frame x y 0 0 1 2 1 1 2 2 2 2 2 3 3 3 2 2 4 4 3 2 5 5 4 3 6 6 2 2 7 7 11 10 >>> a.set_index('frame') x y frame 0 1 2 1 2 2 2 2 3 3 2 2 4 3 2 5 4 3 6 2 2 7 11 10 >>> type(a._metadata) list >>> a._metadata.append(dict()) >>> a.set_index('frame') --------------------------------------------------------------------------- typeerror traceback (most recent call last) <ipython-input-11-a271477b5f41> in <module>() ----> 1 a.set_index('frame') /usr/lib/python2.7/dist-packages/pand...