store = HDFStore('test.h5')
store['df'] = df
store.get_storer('df').attrs.my_attribute = dict(A=10)
store.get_storer('df').attrs.my_attribute
Storing Pandas objects along with regular Python objects in HDF5