Fix a bug introduced in e7fe4e8398
.
parent
b1ad8d1309
commit
4740e94d37
|
@ -167,8 +167,8 @@ def count_comms(comm_df: pd.DataFrame) -> pd.DataFrame:
|
||||||
comm_contacts_counts = (
|
comm_contacts_counts = (
|
||||||
enumerate_contacts(comm_df)
|
enumerate_contacts(comm_df)
|
||||||
.groupby(["participant_id"])
|
.groupby(["participant_id"])
|
||||||
.nunique()
|
.nunique()["contact_id"]
|
||||||
.rename(columns={"contact_id": "no_contacts"})
|
.rename("no_contacts")
|
||||||
)
|
)
|
||||||
# Number of communication contacts
|
# Number of communication contacts
|
||||||
comm_features = comm_counts.join(comm_duration_total)
|
comm_features = comm_counts.join(comm_duration_total)
|
||||||
|
@ -199,8 +199,8 @@ def count_comms(comm_df: pd.DataFrame) -> pd.DataFrame:
|
||||||
comm_contacts_counts = (
|
comm_contacts_counts = (
|
||||||
enumerate_contacts(comm_df)
|
enumerate_contacts(comm_df)
|
||||||
.groupby(["participant_id"])
|
.groupby(["participant_id"])
|
||||||
.nunique()
|
.nunique()["contact_id"]
|
||||||
.rename(columns={"contact_id": "no_contacts"})
|
.rename("no_contacts")
|
||||||
)
|
)
|
||||||
# Number of communication contacts
|
# Number of communication contacts
|
||||||
comm_features = comm_features.join(comm_contacts_counts)
|
comm_features = comm_features.join(comm_contacts_counts)
|
||||||
|
|
Loading…
Reference in New Issue