无法打开bcolz ctable

时间:2019-06-27 12:33:58

标签: bcolz

我将数据从HDF5转换为Bcolz Ctable。当我尝试打开生成的ctable时,出现错误“ RuntimeError:解压缩最后一个块时出错(错误代码:-1)”

代码是;

import h5py
import random
import string
colname = random.choice(string.ascii_uppercase)
randomSource =  string.ascii_uppercase+ string.ascii_lowercase
for i in range(255):
        colname += random.choice(randomSource)
        colnameList = list(colname)
print (colnameList)

f = h5py.File('C:\\Users\\MAR\\.spyder-py3\\featureMatrix_CC_EXC_256_float16.h5')
print(f.keys)
X1 = f['featureMatrix'].value
Y1=f['featureMatrixMean'].value
Z1=f['featureMatrixStd'].value
import pandas as pd
X2 = pd.DataFrame(X1,columns=colnameList)
Y2= pd.DataFrame(Y1,columns=colnameList)
Z2= pd.DataFrame(Z1,columns=colnameList)
Y2=Y2.append(X2)
Z2=Z2.append(Y2)
import bcolz
fx=bcolz.ctable.fromdataframe(Z2,rootdir='C:\\Users\\MAR\\.spyder-py3\\tatouage\\featureSUM', mode='w')
A=bcolz.open('C:\\Users\\MAR\\.spyder-py3\\tatouage\\featureSUM')

您是否知道此错误的根源是什么? 谢谢

0 个答案:

没有答案