fastai.structured 仍然是 fast ai 库的一部分

is fastai.structured still a part of fast ai library

为什么我收到错误 fastai.structured 不是模块?。

我试过安装以前版本的 fastai。但没有任何帮助。

from fastai.imports import *
from fastai.structured import *

#from pandas_summary import DataFrameSummary
from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier
from IPython.display import display

from sklearn import metrics
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-17-35432a48f631> in <module>()
      1 from fastai.imports import *
----> 2 from fastai.structured import *
      3 
      4 #from pandas_summary import DataFrameSummary
      5 from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier

ModuleNotFoundError: No module named 'fastai.structured'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.

该模块不再包含在 fastai 的默认 python 包中。您使用 fastai 包的默认设置命令将不再包含该模块。您可能需要从 GitHub master 下载它,将其保存到您的工作目录,然后从您的工作目录导入到您的 jupyter notebook。

这是来自 fastai 论坛的注释:

The structured.py has been moved to folder “old” (in anticipation to fastai_v1). https://github.com/fastai/fastai/blob/master/old/fastai/structured.py --- Andrei Oct '18

从您的工作目录导入时:
from structured import *

这将取代:
from fastai.structured import *

模块名称已更改为“表格”。因此,请改用“from fastai.tabular import *”。

看这个 >> https://forums.fast.ai/t/modulenotfounderror-no-module-named-fastai-structured/36904