pandas.HDFStore.keys#

HDFStore.keys(include='pandas')[source]#

Return a list of keys corresponding to objects stored in HDFStore.

Parameters:
includestr, default ‘pandas’

When kind equals ‘pandas’ return pandas objects. When kind equals ‘native’ return native HDF5 Table objects.

Returns:
list

List of ABSOLUTE path-names (e.g. have the leading ‘/’).

Raises:
raises ValueError if kind has an illegal value

Examples

>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  
>>> store.put('data', df)  
>>> store.get('data')  
>>> print(store.keys())  
['/data1', '/data2']
>>> store.close()