Python第三方库h5py_读取mat文件并显示值的方法 mat数据格式是Matlab默认保存的数据格式。在Python中,我们可以使用h5py库来读取mat文件。 >>> import h5py >>> data = h5py.File("**.mat") >>> test = data["digitStruct/name"] # >>> st = test[0][0] # >>> obj = data[st] # >>> str = "".join(chr(i) for i in obj[:]) >>> str '1.png' 以上这篇Python第三方库h5py_读取mat文件并显示值的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持中文源码网。