feat(code): Add quick data querying notebook
Added a notebook which has the sole point of quickly allowing me to grab and look at the data of the processed sample I am creating. I.e. quickly list and uniq all interventions/outcomes/inequalities, doing a tiny calculation or similar.
This commit is contained in:
parent
e2c629ff33
commit
3b6ed7a79b
1 changed files with 23 additions and 0 deletions
23
00-notebooks/yml-grab.qmd
Normal file
23
00-notebooks/yml-grab.qmd
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
bibliography: 02-data/supplementary/lib.bib
|
||||||
|
title: Grab yml
|
||||||
|
---
|
||||||
|
|
||||||
|
```{python}
|
||||||
|
import pandas as pd
|
||||||
|
from src import data
|
||||||
|
|
||||||
|
df = data.from_yml()
|
||||||
|
```
|
||||||
|
|
||||||
|
Get interventions:
|
||||||
|
|
||||||
|
```{python}
|
||||||
|
df['intervention'].str.split(";").explode().str.strip().value_counts()
|
||||||
|
```
|
||||||
|
|
||||||
|
Get inequalities:
|
||||||
|
|
||||||
|
```{python}
|
||||||
|
df['inequality'].str.split(";").explode().str.strip().value_counts()
|
||||||
|
```
|
Loading…
Reference in a new issue