Skip to content

Commit

Permalink
handles NaN gene expressions for jsonLd
Browse files Browse the repository at this point in the history
  • Loading branch information
vickydaiya authored Nov 27, 2023
1 parent 4434964 commit 6212441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion containers/extract-summary/context/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def unique_rows_to_summary_rows(

df["@type"] = "CellSummaryRow"
df["percentage"] = df["count"] / df["count"].sum()
df["gene_expr"] = df["gene_expr"].astype(object).apply(json.loads)
df["gene_expr"] = df["gene_expr"].astype(object).apply(lambda x: [] if pd.isna(x) else json.loads(x))
return df.to_dict("records")


Expand Down

0 comments on commit 6212441

Please sign in to comment.