Skip to main content

pypi actions codecov downloads

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())

Metadata

Release files for edc-model-to-dataframe 1.0.1

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

Source distribution (sdist)

Source distribution for edc-model-to-dataframe 1.0.1
File Size Uploaded
edc_model_to_dataframe-1.0.1.tar.gz 36.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for edc-model-to-dataframe 1.0.1
File Interpreter ABI Platform
edc_model_to_dataframe-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 72.7 kB

Release files / edc_model_to_dataframe-1.0.1.tar.gz

Download URL edc_model_to_dataframe-1.0.1.tar.gz
Size 36.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bf428baf14b168279e50bfbce4ef73a529facf9490731aa7eaef803ac990961a
BLAKE2b-256 checksum
How to use checksums
67df256edd079984440dd75b4d9f5745a1d5e1f0fccd7ed6b9135029c81b8c29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / edc_model_to_dataframe-1.0.1-py3-none-any.whl

Download URL edc_model_to_dataframe-1.0.1-py3-none-any.whl
Size 36.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fdf606098e952108a6f000dc58dffa87aaa70a7fca615489ec7316a744bcc5d
BLAKE2b-256 checksum
How to use checksums
2b14ad8cbe66f5ce93cdb5ee4c66941fde0a7497c7fff142ab8a9985cbd79b08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

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