Walk the pytables group hierarchy for pandas objects.
This generator will yield the group path, subgroups and pandas object names for each group.
Any non-pandas PyTables objects that are not a group will be ignored.
The where group itself is listed first (preorder), then each of its child groups (following an alphanumerical order) is also traversed, following the same procedure.
Group where to start walking.
Full path to a group (without trailing ‘/’).
Names (strings) of the groups contained in path.
Names (strings) of the pandas objects contained in path.
Examples
>>> df1 = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')
>>> store.put('data', df1, format='table')
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], columns=['A', 'B'])
>>> store.append('data', df2)
>>> store.close()
>>> for group in store.walk():
... print(group)
>>> 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.walk.html