Skip to content

Commit 94fea44

Browse files
Some person variables are not needed and commented-out
1 parent d899f83 commit 94fea44

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

demos/variables.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -632,39 +632,39 @@ def marital34(persons):
632632
p = persons.to_frame(columns=["MAR"])
633633
return p.isin([3, 4]).astype(int)
634634

635-
636-
# PERSON VARIABLES
637-
# -----------------------------------------------------------------------------------------
635+
######## NOTE: Not needed for now
636+
# # PERSON VARIABLES
637+
# # -----------------------------------------------------------------------------------------
638638

639639

640-
@orca.column("persons", cache=True)
641-
def mandatory_work_zone_id(persons):
642-
return persons.work_zone_id.where(persons.age > 17, "-1").astype(str)
640+
# @orca.column("persons", cache=True)
641+
# def mandatory_work_zone_id(persons):
642+
# return persons.work_zone_id.where(persons.age > 17, "-1").astype(str)
643643

644644

645-
@orca.column("persons", cache=True)
646-
def mandatory_school_zone_id(persons):
647-
return persons.school_zone_id.where(persons.age > 17, "-1").astype(str)
645+
# @orca.column("persons", cache=True)
646+
# def mandatory_school_zone_id(persons):
647+
# return persons.school_zone_id.where(persons.age > 17, "-1").astype(str)
648648

649649

650-
@orca.column("persons", cache=True)
651-
def mandatory_work_dummy(persons):
652-
has_work = persons.mandatory_work_zone_id != "-1"
653-
return has_work.astype(int)
650+
# @orca.column("persons", cache=True)
651+
# def mandatory_work_dummy(persons):
652+
# has_work = persons.mandatory_work_zone_id != "-1"
653+
# return has_work.astype(int)
654654

655655

656-
@orca.column("persons", cache=True)
657-
def mandatory_school_dummy(persons):
658-
has_school = persons.mandatory_school_zone_id != "-1"
659-
return has_school.astype(int)
656+
# @orca.column("persons", cache=True)
657+
# def mandatory_school_dummy(persons):
658+
# has_school = persons.mandatory_school_zone_id != "-1"
659+
# return has_school.astype(int)
660660

661661

662-
@orca.column("persons", cache=True)
663-
def mandatory_activity_dummy(persons):
664-
school_or_work = (persons.mandatory_school_dummy.astype(bool)) | (
665-
persons.mandatory_work_dummy.astype(bool)
666-
)
667-
return school_or_work.astype(int)
662+
# @orca.column("persons", cache=True)
663+
# def mandatory_activity_dummy(persons):
664+
# school_or_work = (persons.mandatory_school_dummy.astype(bool)) | (
665+
# persons.mandatory_work_dummy.astype(bool)
666+
# )
667+
# return school_or_work.astype(int)
668668

669669

670670
# -----------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)