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.8.tar.gz
(60.6 kB
view hashes)
Built Distributions
Close
Hashes for meds_reader-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88b54af751da5e7532b2591ff1df31f4c800e49865c776600ecae9ccf29e74c3 |
|
MD5 | f821ac5b8d9ee43b455c34b32aafecd0 |
|
BLAKE2b-256 | 8559b7b1e458fd6080096d2a86961493319cd5146578c0cf1cce4e2f10151d79 |
Close
Hashes for meds_reader-0.1.8-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1452c5983eca6bc896a486f60bf61db9729e62f373c0b0651888bd63ff217a8 |
|
MD5 | c1f15d4d0d45fde389c742a9587f4069 |
|
BLAKE2b-256 | afa7cac85490be5b8f6bd37e3a9d42b5e63a4bfb6df3fd0553b4f73a3d878367 |
Close
Hashes for meds_reader-0.1.8-cp312-cp312-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03952a31788e1d218eb460bd01cb2b983df9772e124277c013d117d546946e62 |
|
MD5 | e3f9711f9e03c6d7b0f90c0e266a29da |
|
BLAKE2b-256 | f85c5ed70bc23f5617e0aae4e13dbab0f54432c0fded646f7b4549e8fab21f64 |
Close
Hashes for meds_reader-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0180312f042b740bb5faa09d442688be6cf30bdba13493f033c97f0286cfdf6 |
|
MD5 | 29b89057cc79757977a5273f6326835a |
|
BLAKE2b-256 | 288f40d4eab3638ff13c4e03e67e1e04ca2eb32df4f3b2b703038b900f757df5 |
Close
Hashes for meds_reader-0.1.8-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1d2adc8bf3dafa5754045d29956dd3566b4645083514a52940b237b03e9ba6b |
|
MD5 | b2a5e2000db88cb5aea22467efdbdbe3 |
|
BLAKE2b-256 | 86b3330d275aff3b626eb8f4d9d05319722ebcc1e44f15dbfa00cc684cb5a4cf |
Close
Hashes for meds_reader-0.1.8-cp311-cp311-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b0fff1fede7b5a0b6018dc74af6d9750c27ee7a82d70a1223e6c98a46d07952 |
|
MD5 | 3f5d4331d8706a2165d13ee1a35df9f6 |
|
BLAKE2b-256 | 7a465dda84cc1ec11f1cb190599669f6b2a526c29565bb5375fe1d8eb1321023 |
Close
Hashes for meds_reader-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5726a6a2596b99df0c0377c1a9b433594e8baee77ed2a413759e47936ef6e61 |
|
MD5 | 13b0acf7eabb2177dedd69845ec6d771 |
|
BLAKE2b-256 | 96555d7d233c86eae4d18fc4466dec9df9c719ef18d461bc613ba0c20c97f0aa |
Close
Hashes for meds_reader-0.1.8-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81d7f2472e48f7e9c9825968b42ceb95d75eb35b225381e45ea30f23ee4410ed |
|
MD5 | 834c87655737ee8e288d7c3f8a974cf7 |
|
BLAKE2b-256 | d42759f9a4d69b01ad46c5fcd9ced6fe989c76aee183f74eea39431ad6c053ab |
Close
Hashes for meds_reader-0.1.8-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01c14ebabc387467b21386a2a79d3567a4fd5ffde58fd2cf48cc6c767a0848e0 |
|
MD5 | de8a00b4e3d5a33cda51106d6854236a |
|
BLAKE2b-256 | 1053cf35fd94b59c2ee8c9d9ebe0131e7eee812c27f30d0a4f224d2c2b9caeba |
Close
Hashes for meds_reader-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 057b5a930cb6fafb95e5833d2f81dbc4dc67ec39c8693e5d0ce0ba87fdc50e5e |
|
MD5 | 4e4653fe382ca962af49af69531d78c8 |
|
BLAKE2b-256 | 3c53bb5232c2a8e9ab4425409d84df787fee0daeb90d8ba9277ceff43f5d49f8 |
Close
Hashes for meds_reader-0.1.8-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c46d63c358b4046bd28f2e183bdbd912b5df4623068d1683241f9b456e09a9b9 |
|
MD5 | 9886fab6871fc5250f0549685e389703 |
|
BLAKE2b-256 | 40b3d924eba4e55374510830455f6a419be35c857ba75b72c2decfb154a847de |
Close
Hashes for meds_reader-0.1.8-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | faf61eae8746202f0bc534a67fc24941ae8f131ae95f26d8acce64ee7b3bc0f9 |
|
MD5 | 509078c0c0c822a9981feee923da739c |
|
BLAKE2b-256 | 1cb7c10640a8efd0c4a60052a0652d3e90e70419f153c50d9d30bbdd2f3ff797 |