问题
I am unable to specify the minimum size for the index in a to_hdf append operation. Min_itemsize works for the data columns, so how can I get it to work for the index column?
This code:
from pandas import *
df = DataFrame(['1','2'],index=['a','b'])
df.index.name = 'symbol'
df.to_hdf("store.h5",'df',append = True,format='table',min_itemsize = { 'symbol' : 10} )
generates this error message:
ValueError: min_itemsize has the key [symbol] which is not an axis or data_column
来源:https://stackoverflow.com/questions/27222271/how-to-specify-min-itemsize-for-an-index-column