- API reference
- Input/output
- pandas.HDFStore.walk
pandas.HDFStore.walk#
- HDFStore.walk(where='/')[source]#
Walk the pytables group hierarchy for pandas objects.
This generator will yield the group path, subgroups and pandas objectnames for each group.
Any non-pandas PyTables objects that are not a group will be ignored.
Thewhere group itself is listed first (preorder), then each of itschild groups (following an alphanumerical order) is also traversed,following the same procedure.
- Parameters:
- wherestr, default “/”
Group where to start walking.
- Yields:
- pathstr
Full path to a group (without trailing ‘/’).
- groupslist
Names (strings) of the groups contained inpath.
- leaveslist
Names (strings) of the pandas objects contained inpath.
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()>>>forgroupinstore.walk():...print(group)>>>store.close()
On this page