現在、インデックス付き (に属するdata_columns
) 列の名前を変更する方法はありません。これには、オブジェクト内storer.table.colindexes
およびstorer.table.description
オブジェクト内で変更を加える必要があり、両方が特定のタイプであるためです。
In [29]: store.get_storer('df').table
Out[29]:
/df/table (Table(10,)) ''
description := {
"index": Int64Col(shape=(), dflt=0, pos=0),
"a": Int32Col(shape=(), dflt=0, pos=1),
"b": Int32Col(shape=(), dflt=0, pos=2),
"c": Int32Col(shape=(), dflt=0, pos=3)}
byteorder := 'little'
chunkshape := (3276,)
autoindex := True
colindexes := {
"a": Index(6, medium, shuffle, zlib(1)).is_csi=False,
"index": Index(6, medium, shuffle, zlib(1)).is_csi=False,
"c": Index(6, medium, shuffle, zlib(1)).is_csi=False,
"b": Index(6, medium, shuffle, zlib(1)).is_csi=False}
In [30]: type(store.get_storer('df').table.colindexes)
Out[30]: tables.table._ColIndexes
In [31]: type(store.get_storer('df').table.description)
Out[31]: tables.description.Description
PyTables ソリューションをグーグルで検索しようとすると、この質問が見つかりますが、列の名前を変更できる回答はありませんでした。
したがって、HDF5 ファイルを再作成することをお勧めします。