3
我有一个CSV文件,我曾与大熊猫转化它在H5文件生成H5文件:MATLAB读取熊猫
data = pd.read_csv('file.csv')
data.to_hdf('file.h5', 'table')
现在我想用MATLAB读它。
我该怎么做?
我已经试过
data = h5read('file.h5','/g4/lat');
,但我得到:
Error using h5readc
The HDF5 library encountered an error and produced the
following stack trace information:
H5G_traverse_real component not found
H5G_traverse internal path traversal failed
H5G_loc_find can't find object
H5Dopen2 not found
Error in h5read (line 58)
[data,var_class] =
h5readc(Filename,Dataset,start,count,stride);
Error in read_time_series (line 4)
data = h5read(data_path,'/g4/lat');
'/ g4/lat'是您的数据集名称吗? – macduff
熊猫(通过pytables)在HDF5的顶部添加了更多元数据*。 Matlab可能无法读取它。你可能有运气使用H5py,可能通过[odo](http://odo.readthedocs.org/en/latest/hdf5.html),它理解熊猫风格和原生HDF5。 – TomAugspurger
没有名称是'data_path'第二个参数是从matlab文档复制的,但我不知道它的含义 – Donbeo