Structured Data Kernel Keeps Dying

I am attempting to use my own data for a structured data project, building on the Rossmann lesson. Everytime I run the following line, my Jupyter kernel dies. Any thoughts?

for v in cat_vars: gctrain[v] = gctrain[v].astype(‘category’).cat.as_ordered()

This is not happening when I run the Rossman notebook, only when I am running my own. I am not sure what I did wrong, at this juncture. I have imported the libraries and created the dataframes in the same way.

I think I figured this out. I was including the dependent variable in the list of continuous and categorial variables above. That, of course, doesn’t make sense. Thanks for anyone you gave this a thought!

1 Like

if this ever happens again please try the following:
uninstalling all of:

  • ipykernel
  • ipython
  • jupyter_client
  • jupyter_core
  • traitlets
  • ipython_genutils

And then install again. If you’re doing this inside a conda env, it might be easiest to create a new environment and start from scratch. Also, if you’re going to install with conda, run conda clean -tipsy to clean up conda caches before you start.

hope this helps