The directory structure I have looks like this:
file.zip/2019/file.h5
where:
file.zip is the zipped folder
2019 is the folder inside the zipped folder
I can extract the folder using extractall and read the h5 file from the folder. However, looking to read it directly from the zipped folder to pandas dataframe. Its a H5File and not HDFStore.
--
You received this message because you are subscribed to the Google Groups "h5py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h5py+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h5py/82d39bae-8504-4c4a-b582-f0cd9ece4acd%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "h5py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h5py+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h5py/59d4c481-9dec-4bbb-a84e-60ad6cd8d714%40googlegroups.com.
import zipfile
import h5py
zf = zipfile.ZipFile('zipfolder.zip')
fiz = zf.open('zipfolder/2019/sample.h5')
hf = h5py.File(fiz)
hf['data'][:]
throws "TypeError: expected str, bytes or os.PathLike object, not ZipExtFile"
file structure : folder1.zip-->folder1--->2019-->sample.h5
Code to create a sample file: Here is the code to recreate a sample h5 file that I am trying to use in this scenario: Step 1:
`import h5py
file = h5py.File('sample.h5','w')
dataset = file.create_dataset("dset",(4, 6), h5py.h5t.STD_I32BE)
file.close()`
Step 2: After the file is created, put it in a folder "2019".Place "2019" inside another folder called zipfolder and zip it. so now the directory structure looks like "file.zip/2019/file.h5"
--
You received this message because you are subscribed to the Google Groups "h5py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h5py+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h5py/15b3fd32-988e-4a95-8d2c-ba30f40cfe75%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h5py/CAOvn4qg_LpQvHEQXRV0A748hKmVFpK1zUcdiGmXY_Drnn0PRsg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h5py/CAJS%3DJVW%3DDtacYEGVcpEVd9062DYibOrKjRAVUk2egK%3DJbDM1hA%40mail.gmail.com.