将HDF5转换为CSV或tsv文件 [英] Converting hdf5 to csv or tsv files
问题描述
我正在寻找一个示例代码,该示例代码可以将.h5文件转换为csv或tsv. 我必须阅读.h5,输出应为csv或tsv.
示例代码将不胜感激,请帮忙,因为我最近几天一直坚持使用它.我遵循包装器类,但不知道如何使用.我不是一个好的程序员,因此面临很多问题./p>
请帮助 提前非常感谢
您也可以使用h5dump -o dset.asci -y -w 400 dset.h5
-
-o dset.asci
指定输出文件 -
-y -w 400
指定尺寸大小乘以打印每个值所需的位置和空格数.您应该在这里取一个非常大的数字. -
dset.h5
当然是您要转换的hdf5文件
这会将其转换为可轻松导入excel的ascii文件,您可以从该文件轻松将其另存为.csv
(另存为excel,并指定文件格式).我做了几次,对我有用. 源
I am looking for a sample code which can convert .h5 files to csv or tsv. I have to read .h5 and output should be csv or tsv.
Sample code would be much appreciated,please help as i have stuck on it for last few days.I followed wrapper classes but don't know how to use that.I am not a good programmer so facing lot of problem.
please help thanks a lot in advance
You can also use h5dump -o dset.asci -y -w 400 dset.h5
-o dset.asci
specifies the output file-y -w 400
specifies the dimension size multiplied by the number of positions and spaces needed to print each value. You should take a very large number here.dset.h5
is of course the hdf5 file you want to convert
This converts it to an ascii file, which is easy imported to excel, from where you can easily save it as a .csv
(save as within excel, and specify file format). I did it a couple of times, and it worked for me. source
这篇关于将HDF5转换为CSV或tsv文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!