Skip to content

Commit a5ce9ab

Browse files
committed
Suppress duplicates in Label Recognition spreadsheet
1 parent d5d6f9f commit a5ce9ab

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pipelines/assets/livelihood_activity.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ def livelihood_activity_label_recognition_dataframe(
671671
all_labels_df[
672672
[
673673
"label_lower",
674+
"activity_type",
674675
"activity_label_regex",
675676
"strategy_type_regex",
676677
"is_start_regex",
@@ -693,8 +694,8 @@ def livelihood_activity_label_recognition_dataframe(
693694
]
694695
]
695696
.drop_duplicates()
696-
.set_index("label_lower"),
697-
on="label",
697+
.set_index(["label_lower", "activity_type"]),
698+
on=["label", "activity_type"],
698699
how="inner",
699700
)
700701

0 commit comments

Comments
 (0)