Fixed Json Output
This commit is contained in:
@@ -8,12 +8,12 @@ def aggregateHashes(executions_json) -> pd.DataFrame:
|
||||
"""
|
||||
Takes the executions, aggregates all the data with sha256 as primary, then returns aggregated dataframe
|
||||
"""
|
||||
data = executions_json
|
||||
data = json.loads(executions_json)
|
||||
df = pd.DataFrame(data["response"]["exechistories"])
|
||||
|
||||
if df.empty:
|
||||
return df
|
||||
|
||||
print(df)
|
||||
# Aggregate by sha256, deduplicate lists, and preserve order
|
||||
agg_df = df.groupby("sha256").agg(lambda x: list(dict.fromkeys(x))).reset_index()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user