Commit 7e08ff89 authored by kaghog's avatar kaghog
Browse files

add column that specifies days of the week

parent 95dc7ba1
......@@ -63,6 +63,16 @@ def execute(context):
df_mz_persons["sunday"] = False
df_mz_persons.loc[df_mz_persons["tag"] == 7, "sunday"] = True
#specify day of the week
df_mz_persons["day"] = "monday"
df_mz_persons.loc[df_mz_persons["tag"] == 2, "day"] = "tuesday"
df_mz_persons.loc[df_mz_persons["tag"] == 3, "day"] = "wednesday"
df_mz_persons.loc[df_mz_persons["tag"] == 4, "day"] = "thursday"
df_mz_persons.loc[df_mz_persons["tag"] == 5, "day"] = "friday"
df_mz_persons.loc[df_mz_persons["tag"] == 6, "day"] = "saturday"
df_mz_persons.loc[df_mz_persons["tag"] == 7, "day"] = "sunday"
# Here we extract a bit more than Kirill, but most likely it will be useful later
df_mz_persons["subscriptions_ga"] = df_mz_persons["f41610a"] == 1
......@@ -123,7 +133,7 @@ def execute(context):
"subscriptions_verbund_class",
"subscriptions_strecke_class",
"age_class", "person_weight",
"weekend", "saturday", "sunday", "date"
"weekend", "saturday", "sunday", "date", "day"
]]
# Merge in the other data sets
......
Supports Markdown
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