Fix a bug introduced in e7fe4e8398 .

communication
junos 2021-08-18 10:48:34 +02:00
parent b1ad8d1309
commit 4740e94d37
1 changed files with 4 additions and 4 deletions

View File

@ -167,8 +167,8 @@ def count_comms(comm_df: pd.DataFrame) -> pd.DataFrame:
comm_contacts_counts = (
enumerate_contacts(comm_df)
.groupby(["participant_id"])
.nunique()
.rename(columns={"contact_id": "no_contacts"})
.nunique()["contact_id"]
.rename("no_contacts")
)
# Number of communication contacts
comm_features = comm_counts.join(comm_duration_total)
@ -199,8 +199,8 @@ def count_comms(comm_df: pd.DataFrame) -> pd.DataFrame:
comm_contacts_counts = (
enumerate_contacts(comm_df)
.groupby(["participant_id"])
.nunique()
.rename(columns={"contact_id": "no_contacts"})
.nunique()["contact_id"]
.rename("no_contacts")
)
# Number of communication contacts
comm_features = comm_features.join(comm_contacts_counts)