当我导入mlxtend.frequent_patterns
时,功能fpgrowth
并fpmax
没有。但是,如果我在 Anaconda Navigator 中使用 Jupyter Notebook,它们就在那里。
有人知道为什么 Colab 不会导入吗?
import pandas as pd
from mlxtend.preprocessing import TransactionEncoder
from mlxtend.frequent_patterns import apriori, fpmax, fpgrowth
ImportError
Traceback (last last call last)
in ()
2
3 from mlxtend.preprocessing import TransactionEncoder
----> 4 from mlxtend.frequent_patterns import apriori, fpmax, fpgrowth
5
6
ImportError: cannot import name 'fpmax' from 'mlxtend.frequent_patterns ' (/usr/local/lib/python3.7/dist-packages/mlxtend/frequent_patterns/init .py )