Created
October 27, 2021 22:29
-
-
Save abhijeet-talaulikar/46b42585f3462ab1b138f8c5c17d17ea to your computer and use it in GitHub Desktop.
sort_transaction.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sort_transaction(t, one_itemset_dict): | |
sorted_t = sorted(one_itemset_dict.keys(), key=one_itemset_dict.get, reverse=True) | |
return [i for i in sorted_t if i in t] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment