meta-edc 1.0.7__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meta_ae/action_items.py +10 -2
- meta_ae/baker_recipes.py +1 -2
- meta_ae/tests/tests/test_actions.py +1 -2
- meta_analytics/README.rst +1 -2
- meta_analytics/notebooks/anu.ipynb +95 -0
- meta_analytics/notebooks/appointment_planning.ipynb +329 -0
- meta_analytics/notebooks/arvs.ipynb +103 -0
- meta_analytics/notebooks/cleaning/consent_v1_ext.ipynb +227 -0
- meta_analytics/notebooks/cleaning/offschedule_eos.ipynb +353 -0
- meta_analytics/notebooks/dsmc/renal_dysfunction.ipynb +435 -0
- meta_analytics/notebooks/endpoints/meta_endpoints_by_date.ipynb +664 -0
- meta_analytics/notebooks/followup_examination.ipynb +141 -0
- meta_analytics/notebooks/hba1c.ipynb +136 -0
- meta_analytics/notebooks/hiv_regimens.ipynb +122 -118
- meta_analytics/notebooks/incidence.ipynb +232 -0
- meta_analytics/notebooks/liver.ipynb +389 -0
- meta_analytics/notebooks/magreth.ipynb +645 -0
- meta_analytics/notebooks/monitoring_report.ipynb +721 -448
- meta_analytics/notebooks/pharmacy.ipynb +405 -306
- meta_analytics/notebooks/pharmacy_stock_202410.ipynb +306 -0
- meta_analytics/notebooks/steering.ipynb +61 -0
- meta_analytics/notebooks/undiagnosed/meta3_screening_consort_chart.ipynb +1176 -0
- meta_analytics/notebooks/undiagnosed/meta3_screening_undiagnosed.ipynb +519 -0
- meta_analytics/notebooks/undiagnosed/meta_screening_table2.ipynb +964 -0
- meta_analytics/notebooks/undiagnosed/screen_undiagnosed_or.ipynb +296 -0
- meta_analytics/notebooks/undiagnosed/screening.ipynb +273 -0
- meta_analytics/notebooks/undiagnosed/screening2.ipynb +958 -0
- meta_analytics/notebooks/undiagnosed/screening_undiagnosed_20241002.ipynb +958 -0
- meta_analytics/notebooks/ven.ipynb +191 -0
- meta_analytics/notebooks/vitals.ipynb +263 -0
- meta_edc/settings/debug.py +3 -2
- meta_edc/urls.py +1 -0
- {meta_edc-1.0.7.dist-info → meta_edc-1.1.1.dist-info}/METADATA +3 -3
- {meta_edc-1.0.7.dist-info → meta_edc-1.1.1.dist-info}/RECORD +62 -35
- {meta_edc-1.0.7.dist-info → meta_edc-1.1.1.dist-info}/WHEEL +1 -1
- meta_labs/reportables.py +14 -11
- meta_labs/tests/test_reportables.py +33 -12
- meta_pharmacy/notebooks/pharmacy.ipynb +41 -0
- meta_prn/admin/offschedule_pregnancy_admin.py +3 -3
- meta_prn/admin/onschedule_dm_referral_admin.py +5 -5
- meta_prn/form_validators/end_of_study.py +2 -2
- meta_prn/migrations/0063_historicaloffstudymedication_singleton_field_and_more.py +37 -0
- meta_prn/migrations/0064_auto_20250602_2143.py +18 -0
- meta_prn/models/end_of_study.py +2 -0
- meta_prn/models/off_study_medication.py +2 -0
- meta_reports/admin/last_imp_refill_admin.py +3 -2
- meta_screening/eligibility/eligibility_part_three/base_eligibility_part_three.py +59 -47
- meta_screening/form_validators/screening_part_three.py +6 -1
- meta_screening/tests/meta_test_case_mixin.py +3 -0
- meta_screening/tests/tests/test_forms.py +9 -2
- meta_screening/tests/tests/test_screening_part_three.py +11 -14
- meta_subject/action_items.py +2 -3
- meta_subject/choices.py +2 -1
- meta_subject/form_validators/delivery_form_validator.py +1 -0
- meta_subject/forms/blood_results/blood_results_rft_form.py +60 -3
- meta_subject/forms/delivery_form.py +2 -0
- meta_subject/migrations/0223_bloodresultsfbc_errors_bloodresultsgludummy_errors_and_more.py +83 -0
- meta_subject/migrations/0224_bloodresultsfbc_abnormal_summary_and_more.py +153 -0
- meta_subject/tests/tests/test_egfr.py +5 -5
- meta_analytics/dataframes/enrolled/__init__.py +0 -0
- {meta_edc-1.0.7.dist-info → meta_edc-1.1.1.dist-info}/licenses/AUTHORS.rst +0 -0
- {meta_edc-1.0.7.dist-info → meta_edc-1.1.1.dist-info}/licenses/LICENSE +0 -0
- {meta_edc-1.0.7.dist-info → meta_edc-1.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,519 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": null,
|
6
|
+
"id": "0",
|
7
|
+
"metadata": {},
|
8
|
+
"outputs": [],
|
9
|
+
"source": [
|
10
|
+
"%%capture\n",
|
11
|
+
"# output is suppressed but normally would spew out all the edc loading messages\n",
|
12
|
+
"\n",
|
13
|
+
"import os\n",
|
14
|
+
"from pathlib import Path\n",
|
15
|
+
"from datetime import datetime\n",
|
16
|
+
"import pandas as pd\n",
|
17
|
+
"import numpy as np\n",
|
18
|
+
"import math\n",
|
19
|
+
"# import matplotlxib.pyplot as plt\n",
|
20
|
+
"# import seaborn as sns\n",
|
21
|
+
"import scipy.stats as stats\n",
|
22
|
+
"\n",
|
23
|
+
"from dj_notebook import activate\n",
|
24
|
+
"\n",
|
25
|
+
"env_file = os.environ[\"META_ENV\"]\n",
|
26
|
+
"documents_folder = os.environ[\"META_DOCUMENTS_FOLDER\"]\n",
|
27
|
+
"report_folder = Path(documents_folder)\n",
|
28
|
+
"\n",
|
29
|
+
"plus = activate(dotenv_file=env_file)\n"
|
30
|
+
]
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"cell_type": "code",
|
34
|
+
"execution_count": null,
|
35
|
+
"id": "1",
|
36
|
+
"metadata": {},
|
37
|
+
"outputs": [],
|
38
|
+
"source": [
|
39
|
+
"from meta_screening.models import SubjectScreening\n",
|
40
|
+
"from meta_consent.models import SubjectConsent\n",
|
41
|
+
"from meta_subject.models import PhysicalExam, SubjectVisit\n",
|
42
|
+
"from django_pandas.io import read_frame\n",
|
43
|
+
"from django.contrib.sites.models import Site\n",
|
44
|
+
"from edc_analytics.custom_tables import (\n",
|
45
|
+
" BmiTable, BpTable, AgeTable, ArtTable, GenderTable, FbgTable, OgttTable, \n",
|
46
|
+
" FbgOgttTable, WaistCircumferenceTable, HbA1cTable\n",
|
47
|
+
")\n",
|
48
|
+
"from meta_analytics.dataframes.screening import get_glucose_tested_only_df\n"
|
49
|
+
]
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"cell_type": "code",
|
53
|
+
"execution_count": null,
|
54
|
+
"id": "2",
|
55
|
+
"metadata": {},
|
56
|
+
"outputs": [],
|
57
|
+
"source": [
|
58
|
+
"df_all = get_glucose_tested_only_df() # slow"
|
59
|
+
]
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"cell_type": "code",
|
63
|
+
"execution_count": null,
|
64
|
+
"id": "3",
|
65
|
+
"metadata": {},
|
66
|
+
"outputs": [],
|
67
|
+
"source": [
|
68
|
+
"sites = {obj.domain: obj.id for obj in Site.objects.all()}\n",
|
69
|
+
"df_all[\"site\"] = df_all[\"site\"].map(sites)"
|
70
|
+
]
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"cell_type": "code",
|
74
|
+
"execution_count": null,
|
75
|
+
"id": "4",
|
76
|
+
"metadata": {},
|
77
|
+
"outputs": [],
|
78
|
+
"source": [
|
79
|
+
"df_all"
|
80
|
+
]
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"cell_type": "code",
|
84
|
+
"execution_count": null,
|
85
|
+
"id": "5",
|
86
|
+
"metadata": {},
|
87
|
+
"outputs": [],
|
88
|
+
"source": [
|
89
|
+
"df = df_all.copy()\n",
|
90
|
+
"df = df[df[\"has_dm\"]==\"No\"]\n",
|
91
|
+
"df = df.reset_index(drop=True)"
|
92
|
+
]
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"cell_type": "code",
|
96
|
+
"execution_count": null,
|
97
|
+
"id": "6",
|
98
|
+
"metadata": {},
|
99
|
+
"outputs": [],
|
100
|
+
"source": [
|
101
|
+
"tbl = GenderTable(df)\n",
|
102
|
+
"gender_df = tbl.table_df"
|
103
|
+
]
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"cell_type": "code",
|
107
|
+
"execution_count": null,
|
108
|
+
"id": "7",
|
109
|
+
"metadata": {},
|
110
|
+
"outputs": [],
|
111
|
+
"source": [
|
112
|
+
"tbl = WaistCircumferenceTable(df)\n",
|
113
|
+
"waist_df = tbl.table_df"
|
114
|
+
]
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"cell_type": "code",
|
118
|
+
"execution_count": null,
|
119
|
+
"id": "8",
|
120
|
+
"metadata": {},
|
121
|
+
"outputs": [],
|
122
|
+
"source": [
|
123
|
+
"tbl = ArtTable(df)\n",
|
124
|
+
"art_df = tbl.table_df"
|
125
|
+
]
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"cell_type": "code",
|
129
|
+
"execution_count": null,
|
130
|
+
"id": "9",
|
131
|
+
"metadata": {},
|
132
|
+
"outputs": [],
|
133
|
+
"source": [
|
134
|
+
"tbl = AgeTable(df)\n",
|
135
|
+
"age_df = tbl.table_df"
|
136
|
+
]
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"cell_type": "code",
|
140
|
+
"execution_count": null,
|
141
|
+
"id": "10",
|
142
|
+
"metadata": {},
|
143
|
+
"outputs": [],
|
144
|
+
"source": [
|
145
|
+
"tbl = BpTable(df)\n",
|
146
|
+
"bp_df = tbl.table_df"
|
147
|
+
]
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"cell_type": "code",
|
151
|
+
"execution_count": null,
|
152
|
+
"id": "11",
|
153
|
+
"metadata": {},
|
154
|
+
"outputs": [],
|
155
|
+
"source": [
|
156
|
+
"tbl = FbgTable(df)\n",
|
157
|
+
"fbg_df = tbl.table_df"
|
158
|
+
]
|
159
|
+
},
|
160
|
+
{
|
161
|
+
"cell_type": "code",
|
162
|
+
"execution_count": null,
|
163
|
+
"id": "12",
|
164
|
+
"metadata": {},
|
165
|
+
"outputs": [],
|
166
|
+
"source": [
|
167
|
+
"tbl = OgttTable(df)\n",
|
168
|
+
"ogtt_df = tbl.table_df"
|
169
|
+
]
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"cell_type": "code",
|
173
|
+
"execution_count": null,
|
174
|
+
"id": "13",
|
175
|
+
"metadata": {},
|
176
|
+
"outputs": [],
|
177
|
+
"source": [
|
178
|
+
"tbl = FbgOgttTable(df)\n",
|
179
|
+
"fbg_ogtt_df = tbl.table_df"
|
180
|
+
]
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"cell_type": "code",
|
184
|
+
"execution_count": null,
|
185
|
+
"id": "14",
|
186
|
+
"metadata": {},
|
187
|
+
"outputs": [],
|
188
|
+
"source": [
|
189
|
+
"tbl = BmiTable(df)\n",
|
190
|
+
"bmi_df = tbl.table_df"
|
191
|
+
]
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"cell_type": "code",
|
195
|
+
"execution_count": null,
|
196
|
+
"id": "15",
|
197
|
+
"metadata": {},
|
198
|
+
"outputs": [],
|
199
|
+
"source": [
|
200
|
+
"tbl = HbA1cTable(df)\n",
|
201
|
+
"hba1c_df = tbl.table_df"
|
202
|
+
]
|
203
|
+
},
|
204
|
+
{
|
205
|
+
"cell_type": "code",
|
206
|
+
"execution_count": null,
|
207
|
+
"id": "16",
|
208
|
+
"metadata": {},
|
209
|
+
"outputs": [],
|
210
|
+
"source": [
|
211
|
+
"tbl_df = pd.concat([gender_df, age_df, bmi_df, waist_df, bp_df, art_df, fbg_df, ogtt_df, fbg_ogtt_df, hba1c_df], ignore_index=True)\n",
|
212
|
+
"tbl_df.iloc[:, :5]"
|
213
|
+
]
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"cell_type": "code",
|
217
|
+
"execution_count": null,
|
218
|
+
"id": "17",
|
219
|
+
"metadata": {},
|
220
|
+
"outputs": [],
|
221
|
+
"source": [
|
222
|
+
"\n",
|
223
|
+
"fname = f\"meta3_table2-{datetime.now().strftime(\"%Y-%m-%d-%H%M\")}.csv\"\n",
|
224
|
+
"tbl_df.iloc[:, :5].to_csv(path_or_buf=report_folder / fname, encoding=\"utf-8\", index=0, sep=\"|\")\n"
|
225
|
+
]
|
226
|
+
},
|
227
|
+
{
|
228
|
+
"cell_type": "code",
|
229
|
+
"execution_count": null,
|
230
|
+
"id": "18",
|
231
|
+
"metadata": {},
|
232
|
+
"outputs": [],
|
233
|
+
"source": []
|
234
|
+
},
|
235
|
+
{
|
236
|
+
"cell_type": "code",
|
237
|
+
"execution_count": null,
|
238
|
+
"id": "19",
|
239
|
+
"metadata": {},
|
240
|
+
"outputs": [],
|
241
|
+
"source": [
|
242
|
+
"df_all[df_all[\"waist_circumference\"].notna()].count()"
|
243
|
+
]
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"cell_type": "code",
|
247
|
+
"execution_count": null,
|
248
|
+
"id": "20",
|
249
|
+
"metadata": {},
|
250
|
+
"outputs": [],
|
251
|
+
"source": [
|
252
|
+
"subject_identifiers = list(df[\"subject_identifier\"])\n",
|
253
|
+
"qs_subject_visit = SubjectVisit.objects.filter(subject_identifier__in=subject_identifiers)\n",
|
254
|
+
"df_subject_visit = read_frame(qs_subject_visit)\n",
|
255
|
+
"df_subject_visit.rename(columns={\"id\": \"subject_visit\"}, inplace=True)\n",
|
256
|
+
"qs_physical_exam = PhysicalExam.objects.filter(\n",
|
257
|
+
" subject_visit__subject_identifier__in=subject_identifiers\n",
|
258
|
+
")\n",
|
259
|
+
"df_physical_exam = read_frame(qs_physical_exam)\n",
|
260
|
+
"# merge w/ subject visit to get subject_identifier\n",
|
261
|
+
"# df_physical_exam = pd.merge(\n",
|
262
|
+
"# df_physical_exam,\n",
|
263
|
+
"# df_subject_visit[\n",
|
264
|
+
"# [\"subject_visit\", \"subject_identifier\", \"visit_code\", \"visit_code_sequence\"]\n",
|
265
|
+
"# ],\n",
|
266
|
+
"# on=\"subject_visit\",\n",
|
267
|
+
"# how=\"left\",\n",
|
268
|
+
"# )\n",
|
269
|
+
"# df_physical_exam = df_physical_exam[\n",
|
270
|
+
"# [\"subject_identifier\", \"visit_code\", \"visit_code_sequence\", \"waist_circumference\"]\n",
|
271
|
+
"# ]\n",
|
272
|
+
"# df_physical_exam[[\"waist_circumference\"]] = df[[\"waist_circumference\"]].apply(\n",
|
273
|
+
"# pd.to_numeric\n",
|
274
|
+
"# )\n",
|
275
|
+
"# # rename column to waist_circumference_baseline\n",
|
276
|
+
"# df_physical_exam[\"waist_circumference_baseline\"] = df_physical_exam[\"waist_circumference\"]\n",
|
277
|
+
"# df_physical_exam.drop(columns=[\"waist_circumference\"])\n",
|
278
|
+
"# df_physical_exam[[\"waist_circumference_baseline\"]] = df_physical_exam[\n",
|
279
|
+
"# [\"waist_circumference_baseline\"]\n",
|
280
|
+
"# ].apply(pd.to_numeric)\n"
|
281
|
+
]
|
282
|
+
},
|
283
|
+
{
|
284
|
+
"cell_type": "code",
|
285
|
+
"execution_count": null,
|
286
|
+
"id": "21",
|
287
|
+
"metadata": {},
|
288
|
+
"outputs": [],
|
289
|
+
"source": [
|
290
|
+
"df_physical_exam.count()"
|
291
|
+
]
|
292
|
+
},
|
293
|
+
{
|
294
|
+
"cell_type": "code",
|
295
|
+
"execution_count": null,
|
296
|
+
"id": "22",
|
297
|
+
"metadata": {},
|
298
|
+
"outputs": [],
|
299
|
+
"source": [
|
300
|
+
"df_physical_exam = pd.merge(\n",
|
301
|
+
" df_physical_exam,\n",
|
302
|
+
" df_subject_visit[\n",
|
303
|
+
" [\"subject_visit\", \"subject_identifier\", \"visit_code\", \"visit_code_sequence\"]\n",
|
304
|
+
" ],\n",
|
305
|
+
" on=\"subject_visit\",\n",
|
306
|
+
" how=\"left\",\n",
|
307
|
+
")\n"
|
308
|
+
]
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"cell_type": "code",
|
312
|
+
"execution_count": null,
|
313
|
+
"id": "23",
|
314
|
+
"metadata": {},
|
315
|
+
"outputs": [],
|
316
|
+
"source": [
|
317
|
+
"len(df_physical_exam)"
|
318
|
+
]
|
319
|
+
},
|
320
|
+
{
|
321
|
+
"cell_type": "code",
|
322
|
+
"execution_count": null,
|
323
|
+
"id": "24",
|
324
|
+
"metadata": {},
|
325
|
+
"outputs": [],
|
326
|
+
"source": [
|
327
|
+
"df_physical_exam = df_physical_exam[\n",
|
328
|
+
" [\"subject_identifier\", \"visit_code\", \"visit_code_sequence\", \"waist_circumference\"]\n",
|
329
|
+
"]\n",
|
330
|
+
"df_physical_exam[[\"waist_circumference\"]] = df_physical_exam[[\"waist_circumference\"]].apply(\n",
|
331
|
+
" pd.to_numeric\n",
|
332
|
+
")\n"
|
333
|
+
]
|
334
|
+
},
|
335
|
+
{
|
336
|
+
"cell_type": "code",
|
337
|
+
"execution_count": null,
|
338
|
+
"id": "25",
|
339
|
+
"metadata": {},
|
340
|
+
"outputs": [],
|
341
|
+
"source": [
|
342
|
+
"len(df_physical_exam)"
|
343
|
+
]
|
344
|
+
},
|
345
|
+
{
|
346
|
+
"cell_type": "code",
|
347
|
+
"execution_count": null,
|
348
|
+
"id": "26",
|
349
|
+
"metadata": {},
|
350
|
+
"outputs": [],
|
351
|
+
"source": [
|
352
|
+
"# rename column to waist_circumference_baseline\n",
|
353
|
+
"df_physical_exam[\"waist_circumference_baseline\"] = df_physical_exam[\"waist_circumference\"]\n",
|
354
|
+
"df_physical_exam.drop(columns=[\"waist_circumference\"])\n",
|
355
|
+
"df_physical_exam[[\"waist_circumference_baseline\"]] = df_physical_exam[\n",
|
356
|
+
" [\"waist_circumference_baseline\"]\n",
|
357
|
+
"].apply(pd.to_numeric)\n"
|
358
|
+
]
|
359
|
+
},
|
360
|
+
{
|
361
|
+
"cell_type": "code",
|
362
|
+
"execution_count": null,
|
363
|
+
"id": "27",
|
364
|
+
"metadata": {},
|
365
|
+
"outputs": [],
|
366
|
+
"source": [
|
367
|
+
"len(df_physical_exam)"
|
368
|
+
]
|
369
|
+
},
|
370
|
+
{
|
371
|
+
"cell_type": "code",
|
372
|
+
"execution_count": null,
|
373
|
+
"id": "28",
|
374
|
+
"metadata": {},
|
375
|
+
"outputs": [],
|
376
|
+
"source": [
|
377
|
+
"df1 = df_all.copy()"
|
378
|
+
]
|
379
|
+
},
|
380
|
+
{
|
381
|
+
"cell_type": "code",
|
382
|
+
"execution_count": null,
|
383
|
+
"id": "29",
|
384
|
+
"metadata": {},
|
385
|
+
"outputs": [],
|
386
|
+
"source": [
|
387
|
+
"df1 = pd.merge(\n",
|
388
|
+
" df1,\n",
|
389
|
+
" df_physical_exam[[\"subject_identifier\", \"waist_circumference_baseline\"]],\n",
|
390
|
+
" on=\"subject_identifier\",\n",
|
391
|
+
" how=\"left\",\n",
|
392
|
+
" indicator=True\n",
|
393
|
+
")\n"
|
394
|
+
]
|
395
|
+
},
|
396
|
+
{
|
397
|
+
"cell_type": "code",
|
398
|
+
"execution_count": null,
|
399
|
+
"id": "30",
|
400
|
+
"metadata": {},
|
401
|
+
"outputs": [],
|
402
|
+
"source": [
|
403
|
+
"df1.count()"
|
404
|
+
]
|
405
|
+
},
|
406
|
+
{
|
407
|
+
"cell_type": "code",
|
408
|
+
"execution_count": null,
|
409
|
+
"id": "31",
|
410
|
+
"metadata": {},
|
411
|
+
"outputs": [],
|
412
|
+
"source": [
|
413
|
+
"\n",
|
414
|
+
"cond = (df1[\"waist_circumference\"].isna()) & (df1[\"waist_circumference_baseline\"].notna())"
|
415
|
+
]
|
416
|
+
},
|
417
|
+
{
|
418
|
+
"cell_type": "code",
|
419
|
+
"execution_count": null,
|
420
|
+
"id": "32",
|
421
|
+
"metadata": {},
|
422
|
+
"outputs": [],
|
423
|
+
"source": [
|
424
|
+
"df1.loc[cond, \"waist_circumference\"] = df1[\"waist_circumference_baseline\"]"
|
425
|
+
]
|
426
|
+
},
|
427
|
+
{
|
428
|
+
"cell_type": "code",
|
429
|
+
"execution_count": null,
|
430
|
+
"id": "33",
|
431
|
+
"metadata": {},
|
432
|
+
"outputs": [],
|
433
|
+
"source": [
|
434
|
+
"df1.count()"
|
435
|
+
]
|
436
|
+
},
|
437
|
+
{
|
438
|
+
"cell_type": "code",
|
439
|
+
"execution_count": null,
|
440
|
+
"id": "34",
|
441
|
+
"metadata": {},
|
442
|
+
"outputs": [],
|
443
|
+
"source": [
|
444
|
+
"df1[[\"waist_circumference\", \"waist_circumference_baseline\"]].count()"
|
445
|
+
]
|
446
|
+
},
|
447
|
+
{
|
448
|
+
"cell_type": "code",
|
449
|
+
"execution_count": null,
|
450
|
+
"id": "35",
|
451
|
+
"metadata": {},
|
452
|
+
"outputs": [],
|
453
|
+
"source": [
|
454
|
+
"df_physical_exam[\"waist_circumference\"].describe()"
|
455
|
+
]
|
456
|
+
},
|
457
|
+
{
|
458
|
+
"cell_type": "code",
|
459
|
+
"execution_count": null,
|
460
|
+
"id": "36",
|
461
|
+
"metadata": {},
|
462
|
+
"outputs": [],
|
463
|
+
"source": [
|
464
|
+
"df_physical_exam[[\"waist_circumference\"]] = df_physical_exam[\n",
|
465
|
+
" [\"waist_circumference\"]\n",
|
466
|
+
"].apply(pd.to_numeric)\n"
|
467
|
+
]
|
468
|
+
},
|
469
|
+
{
|
470
|
+
"cell_type": "code",
|
471
|
+
"execution_count": null,
|
472
|
+
"id": "37",
|
473
|
+
"metadata": {},
|
474
|
+
"outputs": [],
|
475
|
+
"source": [
|
476
|
+
"df1[\"waist_circumference\"].describe()"
|
477
|
+
]
|
478
|
+
},
|
479
|
+
{
|
480
|
+
"cell_type": "code",
|
481
|
+
"execution_count": null,
|
482
|
+
"id": "38",
|
483
|
+
"metadata": {},
|
484
|
+
"outputs": [],
|
485
|
+
"source": [
|
486
|
+
"df1[~df1[\"screening_identifier\"].isin(df1['screening_identifier'].unique())]"
|
487
|
+
]
|
488
|
+
},
|
489
|
+
{
|
490
|
+
"cell_type": "code",
|
491
|
+
"execution_count": null,
|
492
|
+
"id": "39",
|
493
|
+
"metadata": {},
|
494
|
+
"outputs": [],
|
495
|
+
"source": []
|
496
|
+
}
|
497
|
+
],
|
498
|
+
"metadata": {
|
499
|
+
"kernelspec": {
|
500
|
+
"display_name": "Python 3 (ipykernel)",
|
501
|
+
"language": "python",
|
502
|
+
"name": "python3"
|
503
|
+
},
|
504
|
+
"language_info": {
|
505
|
+
"codemirror_mode": {
|
506
|
+
"name": "ipython",
|
507
|
+
"version": 3
|
508
|
+
},
|
509
|
+
"file_extension": ".py",
|
510
|
+
"mimetype": "text/x-python",
|
511
|
+
"name": "python",
|
512
|
+
"nbconvert_exporter": "python",
|
513
|
+
"pygments_lexer": "ipython3",
|
514
|
+
"version": "3.12.4"
|
515
|
+
}
|
516
|
+
},
|
517
|
+
"nbformat": 4,
|
518
|
+
"nbformat_minor": 5
|
519
|
+
}
|