MemOpt #18
@@ -284,7 +284,6 @@ def menu_prepare_to_enforce():
|
|||||||
|
|
||||||
|
|
||||||
exe1 = utils.allowlist.pullPolicyExechistories(url, choice, first_policy ,True)
|
exe1 = utils.allowlist.pullPolicyExechistories(url, choice, first_policy ,True)
|
||||||
print(exe1)
|
|
||||||
data = json.loads(exe1)
|
data = json.loads(exe1)
|
||||||
executionhist_policy1 = pd.DataFrame(data["response"]["exechistories"])
|
executionhist_policy1 = pd.DataFrame(data["response"]["exechistories"])
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ def export_groups_for_review(df, col, group_col, min_number_in_group, path_lengt
|
|||||||
"""
|
"""
|
||||||
Compute longest common paths, group filepaths, write CSV for review.
|
Compute longest common paths, group filepaths, write CSV for review.
|
||||||
"""
|
"""
|
||||||
|
df = df.drop_duplicates(subset=[col], keep='first')
|
||||||
df = add_longest_common_two_local(df, col=col, new_col=group_col)
|
df = add_longest_common_two_local(df, col=col, new_col=group_col)
|
||||||
grouped = df.groupby(group_col)[col].apply(list).reset_index()
|
grouped = df.groupby(group_col)[col].apply(list).reset_index()
|
||||||
grouped = grouped.sort_values(by=col)
|
grouped = grouped.sort_values(by=col)
|
||||||
|
|||||||
Reference in New Issue
Block a user