Hi All,
Trying to run the TabularDataBunch.from_df command to generate a DB for the tabular_learner.
Upon running the code:
tfms = [FillMissing, Categorify]
train_df, valid_df = train_test_split(df, test_size=0.33)
dataB = TabularDataBunch.from_df(path, df, train_df, valid_df, dep_var, dl_tfms=tfms, cat_names=cat_names)
I get this peculiar error:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py”, line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File “”, line 1, in
dataB = TabularDataBunch.from_df(path, df, train_df, valid_df, dep_var, dl_tfms=tfms, cat_names=cat_names)
File “/home/…local/lib/python3.6/site-packages/fastai/tabular/data.py”, line 94, in from_df
cont_names = ifnone(cont_names, list(set(df)-set(cat_names)-{dep_var}))
File “/home/…/.local/lib/python3.6/site-packages/pandas/core/generic.py”, line 1886, in hash
" hashed".format(self.class.name)
TypeError: ‘DataFrame’ objects are mutable, thus they cannot be hashed
Anyone ever skated around this issue?
I thought perhaps it had to do something with the pre-processing arguments at first when I was using procs = procs. However, when you use procs = procs I got a whole other error:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py”, line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File “”, line 1, in
dataB = TabularDataBunch.from_df(path, df, train_df, valid_df, dep_var, procs=procs, cat_names=cat_names)
TypeError: from_df() got multiple values for argument ‘procs’