Commit 249180ee authored by Myriam Begel's avatar Myriam Begel

Fix

parent dded40cf
......@@ -69,23 +69,6 @@ def main():
]
df_ = pd.DataFrame(df_, columns=['Q142', 'id', 'colors'])
df_.to_csv('../data/processed/Q142.csv', index=False)
# Q207
q207 = df["Q207 - Si non, quelles sont les solutions de mobilité "
"alternatives que vous souhaiteriez pouvoir utiliser ?"]
na = q207.isna().sum() / N * 100.
q207 = q207.dropna().apply(lambda x : x.lower())
oui = q207.apply(lambda x: 'oui' in x and not 'non' in x).sum() / N * 100.
non = q207.apply(lambda x: 'non' in x and not 'oui' in x).sum() / N * 100.
nini = q207.apply(lambda x: not 'oui' in x and not 'non' in x).sum() / N * 100.
ouinon = q207.apply(lambda x: 'oui' in x and 'non' in x).sum() / N * 100.
df_ = [['Oui', oui, blue],
['Non', non, red],
['Ni oui, ni non', nini, brown],
['Oui et non', ouinon, orange],
['Pas de réponse', na, grey]
]
df_ = pd.DataFrame(df_, columns=['Q207', 'id', 'colors'])
df_.to_csv('../data/processed/Q207.csv', index=False)
# Questionnaire
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment