Read .mat files in Python
There is a great library for this task called: pymatreader.
Just do as follows:

Install the package: pip install pymatreader

Import the relevant function of this package: from pymatreader import read_mat

Use the function to read the matlab struct: data = read_mat('matlab_struct.mat')

use data.keys() to locate where the data is actually stored.



The keys will usually look like: dict_keys(['__header__', '__version__', '__globals__', 'data_opp']). Where data_opp will be the actual key which stores the data. The name of this key can ofcourse be changed between different files.


Last step - Create your dataframe: my_df = pd.DataFrame(data['data_opp'])

That's it :)
Is it possible to read binary MATLAB .mat files in Python?
I've seen that SciPy has alleged support for reading .mat files, but I'm unsuccessful with it. I installed SciPy version 0.7.0, and I can't find the loadmat() method.