Export EDC model data to pandas dataframe for clinicedc/edc projects
Project description
edc-model-to-dataframe
ModelToDataframe exports EDC subject data into a pandas dataframe. On export it will add subject_identifier and visit tracking columns specific to the EDC. Also, by default, encrypted fields are not exported.
M2M columns are joined into a single field value delimited by comma.
Note: If you are just exporting raw tables, use django_pandas read_frame.
Pass a model name:
from django.apps import apps as django_apps
from edc_model_to_dataframe import ModelToDataframe
model = "meta_subject.followupexaminiation"
m = ModelToDataframe(model)
df = m.dataframe
Pass a queryset:
# using a queryset
model_cls = django_apps.get_model("meta_subject.followupexaminiation")
m = ModelToDataframe(model_cls.objects.all())
df = m.dataframe
read_frame_edc: like in django_pandas, there is a read_frame -like function which wraps ModelToDataframe
from edc_model_to_dataframe import read_frame_edc
model_cls = django_apps.get_model(model)
df = read_frame_edc(model_cls.objects.all())
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edc_model_to_dataframe-1.0.1.tar.gz.
File metadata
- Download URL: edc_model_to_dataframe-1.0.1.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf428baf14b168279e50bfbce4ef73a529facf9490731aa7eaef803ac990961a
|
|
| MD5 |
6c3eec028f95bd8769de0e14b39cb890
|
|
| BLAKE2b-256 |
67df256edd079984440dd75b4d9f5745a1d5e1f0fccd7ed6b9135029c81b8c29
|
File details
Details for the file edc_model_to_dataframe-1.0.1-py3-none-any.whl.
File metadata
- Download URL: edc_model_to_dataframe-1.0.1-py3-none-any.whl
- Upload date:
- Size: 36.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fdf606098e952108a6f000dc58dffa87aaa70a7fca615489ec7316a744bcc5d
|
|
| MD5 |
a2252cb34ed7ce8ce0f302cd74004870
|
|
| BLAKE2b-256 |
2b14ad8cbe66f5ce93cdb5ee4c66941fde0a7497c7fff142ab8a9985cbd79b08
|