Reformat.

labels
junos 2022-03-15 13:28:51 +01:00
parent d470eef27e
commit 5f293211a7
1 changed files with 14 additions and 16 deletions

View File

@ -1,21 +1,21 @@
import json
import numpy as np
import pandas as pd
ESM_TYPE = {
"text": 1,
"radio": 2,
"checkbox": 3,
"likert": 4,
"quick_answers": 5,
"scale": 6,
"datetime": 7,
"pam": 8,
"number": 9,
"web": 10,
"date": 11,
}
"text": 1,
"radio": 2,
"checkbox": 3,
"likert": 4,
"quick_answers": 5,
"scale": 6,
"datetime": 7,
"pam": 8,
"number": 9,
"web": 10,
"date": 11,
}
ESM_STATUS_ANSWERED = 2
@ -101,7 +101,7 @@ def clean_up_esm(df_esm_preprocessed: pd.DataFrame) -> pd.DataFrame:
df_esm = pd.read_csv(snakemake.input[0])
df_esm_preprocessed = preprocess_esm(df_esm)
#TODO Enable getting the right questionnaire here.
# TODO Enable getting the right questionnaire here.
df_esm_PANAS = df_esm_preprocessed[
(df_esm_preprocessed["questionnaire_id"] == 8)
| (df_esm_preprocessed["questionnaire_id"] == 9)
@ -109,5 +109,3 @@ df_esm_PANAS = df_esm_preprocessed[
df_esm_clean = clean_up_esm(df_esm_PANAS)
df_esm_clean.to_csv(snakemake.output[0])