IOError: Can't read data (Can't open directory) - Missing gzip compression filter
Can't just comment - reputation too low.
I had the same issue, simply ran "conda update anaconda" and the problem is gone.
HDF5 viewer for LZF compressed arrays
While h5py comes with LZF, HDF5 itself is not generally distributed or compiled with LZF.
Instead, you can use gzip, which is included with all HDF5 versions and so can be opened on any system:
dset1 = f.create_dataset(r'/path/to/arrays/array_1', data=data,
compression='gzip')
HDFView can open arrays compressed with gzip.
Additionally, if you use gzip, you can use compression_opts
to set the compression level (an integer between 0 and 9):
dset1 = f.create_dataset(r'/path/to/arrays/array_1', data=data,
compression='gzip', compression_opts=9)
why does hdf5 file size increase dramatically when I segment the data to 30 smaller dataframes with 30 different keys
I created some simple tests, and discovered some interesting behavior.
- First, I created some data to mimic your description and saw a 11x
increase in file size going from 1 DF to 30 DFs. So, clearly something's going on...(You will have to provide come code that replicates the 40x increase.) - Next using the same dataframes above I created 2 uncompressed files -- I did not include the compression parameters:
complib='blosc',complevel=9
. As expected, the uncompressed files were larger, but the increase from 1 DF to 30 DFs was much lower (only 65% increase).
Pandas Results
# of DFs | Compression | Size (MB) |
---|---|---|
1 | Blosc-9 | 3.1 |
30 | Blosc-9 | 33.5 |
1 | No | 24.8 |
30 | No | 54.8 |
Related Topics
Allowing Ctrl-C to Interrupt a Python C-Extension
Python: Interplay Between Lib/Site-Packages/Site.Py and Lib/Site.Py
Trying to Import Pypyodbc Module Gives Error 'Odbc Library Is Not Found. Is Ld_Library_Path Set'
Cant Get Pyperclip to Use Copy and Paste Modules on Python3
Auto.Arima() Equivalent for Python
Converting Python Objects for Rpy2
Which Command to Use for Checking Whether Python Is 64Bit or 32Bit
Interfacing Python and Torch7(Lua) via Shared Library
Binding Callbacks to Minimize and Maximize Events in Toplevel Windows
How to Control the Keyboard and Mouse with Python
Why Does Python "Preemptively" Hang When Trying to Calculate a Very Large Number
How to Get the Owner and Group of a Folder with Python on a Linux MAChine
Is This the Right Way to Run a Shell Script Inside Python
How to Connect to Flask Local Server