TabularDataLoaders.from_df error

Hello

so I imported the following

!pip3 install -Uqq fastbook
import fastbook
import fastai2
fastbook.setup_book()

and

from fastbook import *

But when I ran the following code:

dls = TabularDataLoaders.from_df(df_train, path, cat_names=cat_names, cont_names=cont_names,
y_names=target_var, bs=64)

I got the following error

NameError Traceback (most recent call last)
/tmp/ipykernel_33/2423184783.py in
----> 1 dls = TabularDataLoaders.from_df(df_train, path, cat_names=cat_names, cont_names=cont_names,
2 y_names=target_var, bs=64)
NameError: name ā€˜TabularDataLoadersā€™ is not defined

any insight why it does not see the TabularDataLoaders?

You need the following line at the top of your imports (right after fastbook).

from fastai.tabular.all import *   
1 Like