The world’s leading publication for data science, AI, and ML professionals.

Are you still using JupyterLab?

There is a new premium product in the Data Science town. It has superior coding assistance, debugging and more… Is it worth switching?

Photo by Joshua Sortino on Unsplash
Photo by Joshua Sortino on Unsplash

Love them or hate them, one thing’s for sure – Jupyter Notebooks have become the defacto standard for doing Data Science. While the product is not bad, it has its shortcomings. Many of those were addressed by JupyterLab, with the addition of tabs, extension manager, themes and shortcuts editor. As a heavy JupyterLabs user, I spend 80% of my time in JupyterLab (other 20% in SQL editor), so the editor has to be good. Is there a better alternative?

Jupyter Notebooks have become the defacto standard for doing Data Science

Meet PyCharm’s Notebooks

Jupyter Notebook support in PyCharm. The editor is on the left and presentation view on the right.
Jupyter Notebook support in PyCharm. The editor is on the left and presentation view on the right.

PyCharm recently got another superpower – native support for Jupyter Notebooks. This puts PyCharm on the front line of the competition with JupyterLab. But there is a catch – the Jupyter Notebook support is only available in the Professional version of PyCharm, but you can try it for free.

What are the main features?

PyCharm separates editing and viewing results into two separate panes (look at the image above), while in Jupyter Notebooks we get a mix of both. The separation works great when writing markdown or LaTeX equations as it renders it in real-time.

Real-time preview when writing markdown
Real-time preview when writing markdown

The killer feature of PyCharm is coding assistance. While JupyterLab has some kind of code completion, it gets lost really quicky. The code completion simply works with PyCharm. It shows all available methods, which arguments the method takes and it highlights errors. This is where PyCharm is years ahead of JupyterLab.

Code completion with PyCharm
Code completion with PyCharm

The killer feature of PyCharm’s Notebooks is coding assistance

Another area where PyCharm is far superior to JupyterLab is debugging. Good luck with debugging methods in JupyterLab. I tried with pdb and ipdb packages, but it feels so clunky. PyCharm has an excellent debug viewer, where you can list objects and observe all the values of its variables.

Debugging notebooks in PyCharm
Debugging notebooks in PyCharm

I also like code formatting right out of the box and great extension support – no need to install code formatting extension like with JupyterLab. PyCharm also has a great extension IdeaVim, which works better than current Vim extensions for JupyterLab. This is mainly because of browser limitation, like copy-pasting and ctrl+n and ctrl + p shortcuts – Vim users will know what I am talking about.

How does it work behind the scenes?

PyCharm simply starts its own Jupyter Notebook server on port 8889 so that It doesn’t clash with already running the Jupyter server.

jupyter notebook --no-browser

How can I try PyCharm’s Notebooks?

PyCharm has a 1 month free trial period for the Professional version so anyone can try it. If you are a student, JetBrains (the company behind PyCharm) offers Free Educational Licenses for some universities.

Is it worth switching?

While there is no doubt that PyCharm Notebook support is superior to JupyterLab, it is also not free. I would say that it is worth trying it if you spend most of your time editing Jupyter notebooks. Ask your company or university if they can provide you the license. By no means, I would say that PyCharm Jupyter Notebook support is a must-use tool. I have been efficient in JupyterLab for years.

I have been efficient in JupyterLab for years

Let’s connect

Talk: Book a call Socials: YouTube 🎥 | LinkedIn | Twitter Code: GitHub


Related Articles