PyCharm Pro Scientific Mode

NB! Scientific mode is only available in the Pro version of PyCharm.

Started wondering how to execute Jupyter style of cell codes in PyCharm and found out you can make executable cells in PyCharm by enabling Scientific mode.

You can enable Scientific Mode from View –> Scientific Mode.

Cell model enables code execution by cell so you can run python code in order and small portions. For example importing .csv dataset and teaching dataset to machine learning mode in small portions.. Instead of every time you execute your whole code starting from scratch and waiting to import .csv file and teaching model again. Portions of code can be executed from a small green arrow or CTRL+ENTER.

New executable cells can be created in .ipynb and .py files with “#%%” that adds automatic cell reference and “# In[1]:” that manually adds cell reference. Numbered cells just reference previous cells with lower numbers. Green arrow executes codes in order inside Python console as shown in image below.

Jupyter notebook support

If you want to get more features like cell debug mode or Jupyter shortcuts for executing and creating new cells, you can install Jupyter package for PyCharm and run Jupyter server or Docker container and start using .ipynb files.

Jupyter notebook mode is enabled automatically while using .ipynb file and has a different console with visualizations enabled.

Some example code in project Github:


What is “# In[num]:”:
PyCharm scientific mode:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s