I received this .h5 file from a friend and I need to use the data in it for some work. All the data is numerical. This the first time I work with these kind of files. I found many questions and answers here about reading these files but I couldn't find a way to get to lower level of the groups or folders the file contains. The file contains two main folders, i.e. X and Y X contains a folder named 0 which contains two folders named A and B. Y contains ten folders named 1-10. The data I want to read is in A,B,1,2,..,10 for instance I start with
f = h5py.File(filename, 'r')
f.keys()
Now f returns [u'X', u'Y'] The two main folders
Then I try to read X and Y using read_direct but I get the error
AttributeError: 'Group' object has no attribute 'read_direct'
I try to create an object for X and Y as follows
obj1 = f['X']
obj2 = f['Y']
Then if I use command like
obj1.shape
obj1.dtype
I get an error
AttributeError: 'Group' object has no attribute 'shape'
I can see that these command don't work because I use then on X and Y which are folders contains no data but other folders.
So my question is how to get down to the folders named A, B,1-10 to read the data
I couldn't find a way to do that even in the documentation http://docs.h5py.org/en/latest/quick.html