ValueError:MatLab h5文件中的带有pandas.read_hdf的HDF5文件中没有数据集

时间:2018-07-02 15:58:47

标签: python matlab pandas hdf5 h5py

使用时,我得到?key1=val1&key2=val2&key3=val3

{"type":"fridge","pcb"=2.4}

ValueError: No dataset in HDF5 file.显示:

In [1]: import pandas as pda

In [2]: store = pda.read_hdf('X.h5')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-72e9d80a2c5b> in <module>()
----> 1 store = pda.read_hdf('X.h5')

/usr/local/miniconda3/envs/tensorFlow-GPU/lib/python3.6/site-packages/pandas/io/pytables.py in read_hdf(path_or_buf, key, mode, **kwargs)
    356             groups = store.groups()
    357             if len(groups) == 0:
--> 358                 raise ValueError('No dataset in HDF5 file.')
    359             candidate_only_group = groups[0]
    360

ValueError: No dataset in HDF5 file.

如果我使用h5dump,我可以看到数据:

$ h5dump -n X.h5
HDF5 "X.h5" {
FILE_CONTENTS {
 group      /
 dataset    /DS
 }
}

0 个答案:

没有答案