Problem with tabular databunch

hi,

i am a total noob and hopefully someone can help me.
i try to rebuild lesson 6 with my own data and get the error message:

“Can only use .cat accessor with a ‘category’ dtype”

and i have no clue ho to solve it.
my code is:

%reload_ext autoreload
%autoreload 2

from fastai.tabular import *
import numpy as np
import pandas as pd

dftrain = pd.DataFrame(np.random.randint(0,100,size=(1000, 4)), columns=list(‘ABCD’))
dftest = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list(‘ABCD’))

procs=[Normalize]
cat_vars = [“A”, “B”]
cont_vars = [“C”]
dep_vars = [“D”]
valid_idx = range(90)

data = (TabularList.from_df(dftrain, cat_names=cat_vars, cont_names=cont_vars, procs=procs,)
.split_by_idx(valid_idx)
.label_from_df(cols=dep_vars, label_cls=FloatList, log=True)
.add_test(TabularList.from_df(dftest, cat_names=cat_vars, cont_names=cont_vars))
.databunch())

data.show_batch()

ok, found my mistake:

procs=[Categorify, Normalize]

solved it,