Skip to content

Commit ecffba7

Browse files
Remove duplicates from results
1 parent 17a9b8e commit ecffba7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mbdiff/pretty_print.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ def present_explanations(explanations: List) -> str:
1313
pres_df = DataFrame(pres_df)
1414
# NaN means "any value", represent as "-" just like in the original paper
1515
pres_df.fillna("-", inplace=True)
16+
pres_df = pres_df.drop_duplicates()
1617
return tabulate(pres_df, headers="keys")
1718

1819

1920
def present_invalid(combinations: List[Dict]) -> str:
2021
"""Pretty print invalid attr combinations."""
2122
pres_df = DataFrame(combinations)
23+
pres_df = pres_df.drop_duplicates()
2224
return tabulate(pres_df, headers="keys")

0 commit comments

Comments
 (0)