Skip to content
Snippets Groups Projects
Commit d2e6dcc5 authored by nfontrod's avatar nfontrod
Browse files

src/find_interaction_cluster/community_figures/fig_functions.py: fix...

src/find_interaction_cluster/community_figures/fig_functions.py: fix get_feature_by_community function
parent cbb0dd0b
No related branches found
No related tags found
No related merge requests found
......@@ -466,6 +466,8 @@ def get_feature_by_community(df: pd.DataFrame, feature: str) -> Dict:
dic = {}
for i in range(df.shape[0]):
com, id_ft = df.iloc[i, :][['community', f'id_{feature}']]
if isinstance(com, float):
com = None if np.isnan(com) else com
if com is not None:
if com in dic:
dic[com].append(id_ft)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment