A Pythonic interface for MEDS datasets
Project description
meds_reader: A Pythonic interface for MEDS datasets
meds_reader is a fast and easy-to-use library for reading and processing subject data stored in MEDS (Medical Event Data Standard) format using a Python-native API.
Inspired by HuggingFace Datasets, meds_reader transforms MEDS datasets into collections of Python objects, that can then be processed using normal Python functions.
Example
# First we need to convert to a database
# That requires running the following command in a terminal
$ meds_reader_convert mimic_meds mimic_meds_reader --num_threads 4
# Now we can use Python to interact with our data
import meds_reader
# We can now construct a database
database = meds_reader.SubjectDatabase("mimic_meds_reader")
# Databases are dict-like objects that store subject data
# We can iterate through all the subject ids in the database
for subject_id in database:
# We can retrieve subject data given a subject_id
subject = database[subject_id]
# Subject data can be manipulated with normal Python operations
print(subject.subject_id)
for event in subject.events:
print(event.time, event.code)
# We can also iterate through all properties in a generic manner
for property_name, property_value in event:
print(property_name, property_value)
To learn more, see our full documentation.
Installation
meds_reader can be installed using pip.
pip install meds_reader
Interactive Demo
An interactive demo can be found at Google Colab.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
meds_reader-0.1.7.tar.gz
(59.3 kB
view hashes)
Built Distributions
Close
Hashes for meds_reader-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f176b0b428f8c57dcb0b6eef5868959af9f4f67bde74608a118fc2148606897b |
|
MD5 | f1f523b0331b9ef4184675659344c8c6 |
|
BLAKE2b-256 | 3e91253f38e4e3d899f31ebef3e978ea733a27923ec965a2439265355617ef96 |
Close
Hashes for meds_reader-0.1.7-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a0d7e9cef27f7854c97fc143d4b131659386d4a696f205d1d8427d35267c27e |
|
MD5 | 60dfbc47f8f92664b5fdba8517e82d45 |
|
BLAKE2b-256 | 1b63a98f51935cca59c3690aefcb5c3125c082692b6174128d3a1c2d35951857 |
Close
Hashes for meds_reader-0.1.7-cp312-cp312-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b3c76fe3c3016a3aac6738b52cca49d10dbaefced72118b600db3edec939ed9 |
|
MD5 | f298729f3962e31b17e2ea54bcf58c8c |
|
BLAKE2b-256 | e311563477e18cab403aaadb2ba4fdb8856072b9fcb0dfc5a09c914d53f46897 |
Close
Hashes for meds_reader-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb1eabc6cce97e6c48e5c07499e5c1c0ce42c03022f58ff35c4db5df3323c2b4 |
|
MD5 | 8728a76d76474ae607b3db40a05227e0 |
|
BLAKE2b-256 | db95a0f3ecc15691e4951bb97ccc87701a74352d818754499e72d16b430b8832 |
Close
Hashes for meds_reader-0.1.7-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe40e2c5d9321e844af95124d74fd2d8596856dd20553adc454b3068d05c56ac |
|
MD5 | b9ad8668a78fd44f7b091427a6f0bdea |
|
BLAKE2b-256 | 8c6c8379041fe2ee58488d862854f640a1d956a1644f87fb4493aca1b54dfd8c |
Close
Hashes for meds_reader-0.1.7-cp311-cp311-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a516d35d3d28fd4fa46b04e2de5e0beadad0475a7d90d3475162afefb6b9f6cc |
|
MD5 | 941b578642e46f459d59fe3782d15f08 |
|
BLAKE2b-256 | 1ba6ef8cab6515fbfbd4e4efbcb6bc7341504a09c054b79d194e4ef9d53d3395 |
Close
Hashes for meds_reader-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a96dce69ab4af68e39990e4d1067198b0f0e9adfd018b5631722ac03a5858fae |
|
MD5 | 361cd394604d7f846ef9a070902ae3f7 |
|
BLAKE2b-256 | b447d02be69dadb0ce90b73cfedfd35c04797525ee79b96c2841bcd3cc8e02f4 |
Close
Hashes for meds_reader-0.1.7-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 422d920e7e9019fa41b94d4e984563d645e3e0c267a4a3753759e2cb9b447988 |
|
MD5 | 47190c9cbf61734c2246f6e92dfa1308 |
|
BLAKE2b-256 | 3732286a49f01346104cf4b2e6758026afed7ad4aa20a13d5670515988b27fb3 |
Close
Hashes for meds_reader-0.1.7-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a2da682a7d2b0bbe37a4216ed4539321e53b5d4700e42b304cf293bc428cbf4 |
|
MD5 | d8c890323e895e644e40c63e00b5c6e1 |
|
BLAKE2b-256 | 19f449225e6f44b7594464d5110498161d5aa23946e017222639f3c44c0c6d96 |
Close
Hashes for meds_reader-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77b0ee2f4c30d43c8003d7f6a1d4313b9543b6eadac1bb5fc18b15f3a26716fd |
|
MD5 | a0c4d4a8d4a7adb9ee74fb7e3d390a19 |
|
BLAKE2b-256 | c7cd385a1daa49c8b59239da896a2167571815cf358d9011b862ee9c3b34d46e |
Close
Hashes for meds_reader-0.1.7-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f58eaedfa30fffce639207e08ddc99aaa8ac9576b0001fd7595a80d73cbe446 |
|
MD5 | 68216699cbf50e32533acbf188b62b26 |
|
BLAKE2b-256 | 9be666b580ee31ccab22d6d8b73d0ff5eafe3397d6caecd86ead105926c30cbe |
Close
Hashes for meds_reader-0.1.7-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f1888ea3f46e6470ccb32cab6c4707c15ce6cd588a65c041905f619c282643c |
|
MD5 | a4bdab95872a672237eaa7140a2b7c9e |
|
BLAKE2b-256 | 0ced4e6861fc11d992c77aec2cec38a96f04db6d6ea56b6304d2da4cbafa6029 |