Is there a pythonic way to read-only the keys from an h5 file without loading the complete data? I have tried h5py and pandas HDFStore (as shown below):
h5py
f = h5py.File(filename, 'r') h5_keys = list(f.keys())
pandas HDFStore
with pd.HDFStore(filename) as hdf: keys = hdf.keys()
but both methods are very slow, especially when the h5 file is very large.
2.1m questions
2.1m answers
60 comments
57.0k users