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.3.tar.gz
(58.9 kB
view hashes)
Built Distributions
Close
Hashes for meds_reader-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b271f6a4a1818c906dfd5cdfcbd3738fec78b4dcc3c2c2b511a399272297f1ce |
|
MD5 | 98a417660b8d0ae8b3f1f3d3ba6e5082 |
|
BLAKE2b-256 | 7c70253915b8bcecce949f6a7b52b751abaadbee225ce0844f5e45c73a1ebff6 |
Close
Hashes for meds_reader-0.1.3-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c97ca869217ffe1db84f7527d61c5ae48acb96e76766cc3215ceee852b3058aa |
|
MD5 | 58a0109331878f03b67009470347cd94 |
|
BLAKE2b-256 | fb1e380f1c194d395b8e8db7d55e13b15006ac02fd27b513484ba30eb9d36d33 |
Close
Hashes for meds_reader-0.1.3-cp312-cp312-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | accdd9ec31ca5d9ff21d6842b5e0993cd5e7db72ab89afedf9729d60dc08eb10 |
|
MD5 | 828bc25d628a6750b181999a78978bc7 |
|
BLAKE2b-256 | 15cb56b275ecc22cd0ba1fc12083245c52faa9049eb41f722146d4bb371fd04a |
Close
Hashes for meds_reader-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40dbf0dd3caffda6829f605e8c27e748d5be2fabcb08a34a611099ea8e4c59de |
|
MD5 | 9bb3ecfe1f9347988a5d25c9ee4c4188 |
|
BLAKE2b-256 | 1c535d60316c789ce605c908a4f414225fd0d591e7a71c1c212170c8ca386768 |
Close
Hashes for meds_reader-0.1.3-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967b9903f7027aa62033e3f52d8ba159cfeb39012e91bb308d938465b3024371 |
|
MD5 | fae6d033d5791e87dc1065c88a5ac287 |
|
BLAKE2b-256 | 3e8ee07eb079a2f0aded5301536b181840d045157a8ed6d407fc2f1e3857c011 |
Close
Hashes for meds_reader-0.1.3-cp311-cp311-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 092a0a63ebdaaa74170c19afd1223e0b1b696ca0762f1f3b8802dd476fdae483 |
|
MD5 | 7d062e1eaf37ac275770129487a5caf5 |
|
BLAKE2b-256 | 9dc73d17137da133c63111c95a3779aa693481886ebe943d1195feb2e6485a91 |
Close
Hashes for meds_reader-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fa0936ac16143d278ba523b0d00c0473069507599e99f614fefbd6570b89a68 |
|
MD5 | 876b86e855ece76c66f1a366ffff9e36 |
|
BLAKE2b-256 | dacb326ece47db00e3d9fa16b867ef67779f82c9b6c91dbb5179376f7a420459 |
Close
Hashes for meds_reader-0.1.3-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29f2298c65730fc240cfdfd9b73032ed37270de500b24bb53bea944e8e1e8535 |
|
MD5 | 4b33ba51b248a6f357fece20048477fe |
|
BLAKE2b-256 | 4cd3ee914788eaabd1ca41c8ff6202e90799b9683b5f21fe33502670fd899842 |
Close
Hashes for meds_reader-0.1.3-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d358ff71e2d32f332249ee0447f0966a553cdf55c2139b9c5ef102a0e3051318 |
|
MD5 | 609560e3378632357356e258e986ad85 |
|
BLAKE2b-256 | e68053ba03cf557927a4f7f6baed083551c4e3e85b5d2edaa925821c1cde2e6f |
Close
Hashes for meds_reader-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc87ce7174ee4a39fb0298466b8f09f1e2adb7fddde5f86dfdda4325d785dcce |
|
MD5 | 5dc43af948d5350c6d742d8966629ebd |
|
BLAKE2b-256 | 4285bf7925a90b3c1ff08aa81a59a986d9361358436fffff52902c614dcaee55 |
Close
Hashes for meds_reader-0.1.3-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36c3a5e3038da75bfb2ebe1ef68a8a38514cf8dd5c48b8e3f14cc78fbc34c6e |
|
MD5 | 59b757b8cb27c9701bdbcc05f450ec95 |
|
BLAKE2b-256 | 940544493f9b09e32698bdaba33a5b49d0f49f588e23bc3cf3c71c25a60054cc |
Close
Hashes for meds_reader-0.1.3-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0b2fc17448109d468a56e75262301d88affaf8434cdd0fcb36055c64c69ad3c |
|
MD5 | 0e383b5d32ba3fba1917bcf5315018f8 |
|
BLAKE2b-256 | 80216ac21679de03568f7ad066efc14f2ad948dabdbb09401fd60b1570ab50d0 |