diff --git a/config.yaml b/config.yaml index b8cc093c..fc420fdc 100644 --- a/config.yaml +++ b/config.yaml @@ -635,5 +635,5 @@ PARAMS_FOR_ANALYSIS: results-survey413767_final.csv # Belgium 2 ] QUESTION_LIST: survey637813+question_text.csv - FEATURES: [age, gender, startlanguage] + FEATURES: [age, gender, startlanguage, demand, control, demand_control_ratio] CATEGORICAL_FEATURES: [gender] diff --git a/src/data/baseline_features.py b/src/data/baseline_features.py index 61ea6eb7..918cba91 100644 --- a/src/data/baseline_features.py +++ b/src/data/baseline_features.py @@ -80,7 +80,7 @@ if not participant_info.empty: .rename(columns={"index": "question", 0: "score_original"}) ) # Extract question IDs from names such as JobEisen[3] - limesurvey_demand.loc[:, "qid"] = ( + limesurvey_demand["qid"] = ( limesurvey_demand["question"].str.extract(r"\[(\d+)\]").astype(int) ) limesurvey_demand["score"] = limesurvey_demand["score_original"] @@ -113,7 +113,7 @@ if not participant_info.empty: .rename(columns={"index": "question", 0: "score_original"}) ) # Extract question IDs from names such as JobControle[3] - limesurvey_control.loc[:, "qid"] = ( + limesurvey_control["qid"] = ( limesurvey_control["question"].str.extract(r"\[(\d+)\]").astype(int) ) limesurvey_control["score"] = limesurvey_control["score_original"]