📜  如何加载 .mat 文件并将其转换为 .csv 文件? - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:06.431000             🧑  作者: Mango

代码示例1
import pandas as pd
from scipy.io import loadmat

data_dict = loadmat('ecgca274_edfm.mat')
data_array = data_dict['val']
data_array = data_array.transpose(1, 0)
df = pd.DataFrame(data_array,
                  columns=['ch'+str(n) for n in range(1,7)])