Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce18d7c

Browse files
author
Eric Naeseth
committed
Can't use iteritems() if we're potentially deleting things.
1 parent cb0f376 commit ce18d7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fp_growth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def find_frequent_itemsets(transactions, minimum_support):
3939

4040
# Remove infrequent items from the item support dictionary.
4141
items = dict(items)
42-
for item, support in items.iteritems():
42+
for item, support in items.items():
4343
if support < minimum_support:
4444
del items[item]
4545

0 commit comments

Comments
 (0)