Error

10 views
Skip to first unread message

Fred Kwapong key

unread,
Sep 30, 2021, 10:26:57 PMSep 30
to Anaconda - Public
Dear All,
when is run this code 

y_train, X_train = dmatrices(expr, df_train, return_type='dataframe')
 y_test, X_test = dmatrices(expr, df_test, return_type='dataframe')

In am see this error when i run my jupyter notbook, please can i get some help on solving it?

C:\ProgramData\Anaconda3\lib\site-packages\patsy\eval.py in eval(self, expr, source_name, inner_namespace) 164 code = compile(expr, source_name, "eval", self.flags, False) --> 165 return eval(code, {}, VarLookupDict([inner_namespace] 166 + self._namespaces))

NameError Traceback (most recent call last) C:\ProgramData\Anaconda3\lib\site-packages\patsy\compat.py in call_and_wrap_exc(msg, origin, f, *args, **kwargs) 35 try: ---> 36 return f(*args, **kwargs) 37 except Exception as e:

PatsyError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_8384/4095980114.py in <module> ----> 1 y_train, X_train = dmatrices(expr, df_train, return_type='dataframe') 2 y_test, X_test = dmatrices(expr, df_test, return_type='dataframe')

Thank you.

Regards,

FKO
Reply all
Reply to author
Forward
0 new messages