Get an error while preprocessing of CWRU Data set for 1 hp load conditions. 014-inch IR fault data does not have the same data as other data files.
df=pd.DataFrame(columns=['DE_data','fault'])
for root,dirs,files in os.walk("1hp_load_48_KHz",topdown=False):
for file_name in files:
path=os.path.join(root,file_name)
print(path)
mat=scipy.io.loadmat(path)
key_name=list(mat.keys())[3]
DE_data=mat.get(key_name)
fault=np.full((len(DE_data),1),file_name[:-4])
df_temp=pd.DataFrame({'DE_data':np.ravel(DE_data),'fault':np.ravel(fault)})
df=pd.concat([df,df_temp],axis=0)
print(df['fault'].unique())
df.to_csv('1hp_all_faults.csv',index=False)
ValueError: All arrays must be of the same length @mohan696matlab
Get an error while preprocessing of CWRU Data set for 1 hp load conditions. 014-inch IR fault data does not have the same data as other data files.
df=pd.DataFrame(columns=['DE_data','fault'])
for root,dirs,files in os.walk("1hp_load_48_KHz",topdown=False):
for file_name in files:
path=os.path.join(root,file_name)
print(path)
mat=scipy.io.loadmat(path)
key_name=list(mat.keys())[3]
DE_data=mat.get(key_name)
fault=np.full((len(DE_data),1),file_name[:-4])
df_temp=pd.DataFrame({'DE_data':np.ravel(DE_data),'fault':np.ravel(fault)})
df=pd.concat([df,df_temp],axis=0)
print(df['fault'].unique())
df.to_csv('1hp_all_faults.csv',index=False)
ValueError: All arrays must be of the same length @mohan696matlab