Skip to content

Commit

Permalink
fix column name
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Feb 21, 2024
1 parent 8b72fff commit c816125
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgscatalog_utils/aggregate/aggregate_scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def aggregate(scorefiles: list[str]):
dfs = [_melt(x, y) for x, y in zip([sum_df, avg_df], ["SUM", "AVG"])]
# add melted average back
combined = pd.concat([dfs[0], dfs[1]["AVG"]], axis=1)
return combined[["accession", "SUM", "DENOM", "AVG"]]
return combined[["PGS", "SUM", "DENOM", "AVG"]]


def _melt(df, value_name):
Expand All @@ -72,7 +72,7 @@ def _melt(df, value_name):
var_name="PGS",
ignore_index=False,
)
df["accession"] = df["accession"].str.replace(f"_{value_name}", "")
df["PGS"] = df["PGS"].str.replace(f"_{value_name}", "")
return df


Expand Down

0 comments on commit c816125

Please sign in to comment.