Return a list of keys corresponding to objects stored in HDFStore.
When kind equals ‘pandas’ return pandas objects. When kind equals ‘native’ return native HDF5 Table objects.
List of ABSOLUTE path-names (e.g. have the leading ‘/’).
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()
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.HDFStore.keys.html