Skip to content

Tag: jupyter-notebook

Kernel dies when processing DataFrame

I’ve been able to get this to execute once but since then the kernel just hangs and then dies. Any help would be appreciated. [Dataframe head] Answer You might want to consider using .apply() function from pandas directly with a custom function or a lambda expression. Something like this I do not see an…

Jupyter notebook cannot find module

I’m trying to load a module called folium into my Jupyter Notebook environment. When I attempt to load this module, a ModuleNotFoundError is returned. When I run !pip list in the same Jupyter Notebook environment, folium is listed amongst my installed modules. How do I successfully load this module? Ans…

Make dictionary from multiple list

I have a list of customers, and I want to generate a list of random numbers between 1 to 4 for each customer. I used the code below: but I want to have a dictionary like: How would I go about doing this in python? Answer Slight modifications to your existing loop is all you need. You can use your