Update indexer_adapters.py (#895)

Update the lines 71 and 72
before:
entity_df["community"] = entity_df["community"].fillna(-1)
entity_df["community"] = entity_df["community"].astype(int)
after:
entity_df.loc[:, "community"] = entity_df["community"].fillna(-1)
entity_df.loc[:, "community"] = entity_df["community"].astype(int)

Co-authored-by: Alonso Guevara <alonsog@microsoft.com>
This commit is contained in:
guangxiangdebizi 2024-08-29 07:53:33 +08:00 committed by GitHub
parent 26bcdf39ed
commit 1e8bb409f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,8 +68,8 @@ def read_indexer_reports(
report_df = final_community_reports
entity_df = final_nodes
entity_df = _filter_under_community_level(entity_df, community_level)
entity_df["community"] = entity_df["community"].fillna(-1)
entity_df["community"] = entity_df["community"].astype(int)
entity_df.loc[:, "community"] = entity_df["community"].fillna(-1)
entity_df.loc[:, "community"] = entity_df["community"].astype(int)
entity_df = entity_df.groupby(["title"]).agg({"community": "max"}).reset_index()
entity_df["community"] = entity_df["community"].astype(str)