I'm trying to read a matlab .mat file (v7.3) from python. The thing is one of the field in the .mat object is a table (7x6) with named columns, and every time I read the object I only get a 1x6 array with random numbers. I've tried with the h5py and pymatreader libraries but it didn't work.
How to correctly read the matlab .mat in Python?
I'm adding a minimal working example.
So from the Matlab code:
test_table = table([1, 2]', [3, 4]', VariableNames={'a', 'b'});
save("test_table_73.mat", "test_table", "-v7.3");
And the python code to read it:
import mat73
data_73 = mat73.loadmat("test_table_73.mat")
print(data_73)
The python code output
{'test_table': None}
ERROR:root:ERROR: MATLAB type not supported: table, (uint32)
mat73is good in all these. Posted as an answer