Skip to main content

matgrab

Search and extract field names or variables from MATLAB .mat files and return a pandas Dataframe

installation

PYPI

pip install matgrab

usage

python

import matgrab
df = matgrab.mat2df("PATH","VARS")

PATH may be a file path, directory path, or list of either VARS may be a string or list of strings that correspond to field names of desired matlab variables

if your desired data is nested within another named data structure or array, that structure name must proceed the desired variable separated by a "."

EEG.mat
├── dataset_description {string}
└── sub-D0048 {struct}
    ├── anat {struct}
    │   ├── T1w {string}
    │   └── CT {float}
    └── ieeg {array}
        ├── channels {column}
        └── values {column}

To retrieve the values from the above mat file, the command would be:

matgrab.mat2df("EEG.mat",["sub-D0048.anat.T1w","sub-D0048.anat.CT","sub-D0048.ieeg.channels","sub-D0048.ieeg.values"])

Metadata

Release files for matgrab 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matgrab 0.1.0
File Size Uploaded
matgrab-0.1.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for matgrab 0.1.0
File Interpreter ABI Platform
matgrab-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / matgrab-0.1.0.tar.gz

Download URL matgrab-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0ca45ff540c82aecf4bb398af786d7575d607cc2635a0c2617d421de6fe1d853
BLAKE2b-256 checksum
How to use checksums
409a79bfcd464bd89260a75087d9b5aa5e63daecfcf100cd43b7b66effcb6656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

Release files / matgrab-0.1.0-py3-none-any.whl

Download URL matgrab-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8be01122d951877789c1eab03644cdd65cced66eca40846566b8c6722b3669f5
BLAKE2b-256 checksum
How to use checksums
9938f8992b9cf5bb45aa1df1512b93f3658926f5a60c0fb6ab18d589b2dab145
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page