Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

How to load .mat file and convert it to .csv file?

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)])
Comment

PREVIOUS NEXT
Code Example
Python :: python code to print prime numbers 
Python :: how to iterate through ordereddict in python 
Python :: pandas lamda column reference 
Python :: networkx max degree node 
Python :: python how to replace a certain string in text 
Python :: python add field to dictionary 
Python :: python loop append to dictionary 
Python :: add one day to datetime 
Python :: pywhatkit send message 
Python :: save_img keras 
Python :: split string by spaces python 
Python :: create a blank image opencv 
Python :: how to create a python script to automate software installation? 
Python :: get length of pandas 
Python :: Converting Hex to RGB value in Python 
Python :: progressbar time in python 
Python :: convert python float list to 2 digit 
Python :: request headers in django 
Python :: how to convert array to vector in python 
Python :: python find duplicates in string 
Python :: qtablewidget not editable python 
Python :: alpaca api python wrapper 
Python :: how do i turn a tensor into a numpy array 
Python :: python dataframe row count 
Python :: kill python process with bash 
Python :: generate binay image python 
Python :: children beautiful soup 
Python :: copy file python 
Python :: extract int from string python 
Python :: python 3 custom sort with compare 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =