Skip to content

Commit

Permalink
Fix infection channel plot if called with prepared data. (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
janosg authored May 10, 2021
1 parent 2ed8725 commit dec9b8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sid/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ def _is_data_prepared_for_heatmap(df):
return (
isinstance(df, pd.DataFrame)
and df.columns.isin(["date", "channel_infected_by_contact", "share"]).all()
and not df["channel_infected_by_contact"].isin("not_infected_by_contact").any()
and not df["channel_infected_by_contact"]
.isin(["not_infected_by_contact"])
.any()
)


Expand Down

0 comments on commit dec9b8b

Please sign in to comment.